Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Tableau WINDOW_AVG function in Power BI

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

2 REPLIES 2
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
rajendraongole1
Super User
Super User

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!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.