Welcome to the forums!
How about something like:
WINDOW_SUM(SUM( IF Buy == "Yes" THEN 1 ELSE 0 END)) / WINDOW_SUM(SUM(1))
The IF...END statement is operating per Row and just adding a 1 when there is a "Yes". Those are then aggregated using the SUM and then all added together by the WINDOW_SUM from the numerator.
The denominator is just the WINDOW_SUM of a SUM(1) for each No.
Hope that helps!