Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I am trying to rebuild a series of dashboards from Tableau to PowerBI.
One of the calculations I have come across is:
WINDOW_AVG(COUNT([Event Description])/AVG([Turbines]), -2, 0)
The turbines portion of this is the name of the actual turbine so I will need to make a measure that is T_Count = Count('Faults'[Turbines]) and then count the event descriptions. But I can't figure out the equivalent of the WINDOW_AVG function or how to find the average of the count turbines measure.
Thanks in advance,
Mike
Hi,
Share some data to work with, explain the question and show the expected result. Share data in a format that can be pasted in an MS Excel file.
Hi @Anonymous -calculate the moving average over the last 3 periods (including the current period) as below:
Moving_Avg_Event_Count =
AVERAGEX(
FILTER(
ALLSELECTED('Faults'),
'Faults'[Date] >= MAX('Faults'[Date]) - 2 &&
'Faults'[Date] <= MAX('Faults'[Date])
),
CALCULATE(COUNT('Faults'[Event Description]) / COUNT('Faults'[Turbines]))
)
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |