Forum Discussion

Harun072's avatar
Harun072
Regular Visitor
1 year ago
Solved

Rolling 12m average Win Rate

Hi Experts,   I'm kindly asking for your help. I'm trying to create a rolling average for win rate, and while calculating the win rate itself is straightforward, I haven’t been able to figure out h...
  • v-venuppu's avatar
    1 year ago

    Hi Harun072 ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you Jihwan_Kim for the prompt response.

    Building on the PBIX shared by Jihwan_Kim, here’s a breakdown of your follow-up questions:

    1.How can I check which months have been captured for a specific period like April 2024?

    The WINDOW function used in the "Rolling 12 months win rate measure" dynamically looks back 11 months from the current row, based on the order defined by 'calendar'[Year -Month sort]. So for April 2024, it includes data from May 2023 to April 2024, sorted by that column.

    To visually debug this, you could create a table showing:

    • 'calendar'[Year -Month]
    • [Win rate %]
    • [Rolling 12 months win rate]

    This will help confirm the rolling window visually for each row.

    2.What happens with months where there’s no data, like May to August 2024? (What happens with blank months?)

    • In the first measure (Rolling 12 months win rate), blank months are still part of the 12-month window. If those months have no win/lost data, they contribute nothing to the average (resulting in a diluted percentage).
    • In the second measure (Rolling 12 months win rate hide blank), the rolling window is still fixed at 12 months, but the measure returns BLANK() when the current month has no data (both win/lost counts are blank). So that month is effectively skipped in the chart.

    3.How can I hide future months that haven’t started yet?

    You can use a calculated column in the 'calendar' table:

    IsFutureMonth = IF('calendar'[Date] > TODAY(), 1, 0)

    • Then use this column as a filter on your visual (e.g., only show rows where IsFutureMonth = 0). This will automatically hide future months.

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

    Thank you.