cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AB_PBI
Frequent Visitor

How to calculate the average of a measure?

Hi All,

I have defined the below measure named "Total_HC":

 

Total_HC =
CALCULATE(COUNTROWS(factData),FILTER(factData,factData[REVENUE_STATUS]<>"Excluded"&&factData[REVENUE_STATUS]<>"Sales, Support & Tech Support"))

 

Is there a way I can define another measure that computes the average of "Total_HC"?

 

Thanks!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

The basic principle is to perform an AVERAGEX over a variable which summarizes the dimension you want the average over, which could be date, category, etc.

Average of measure =
var summaryTable = ADDCOLUMNS( SUMMARIZE( 'Date', 'Date'[Year month]), "@val", [Measure name])
return AVERAGEX( summaryTable, [@val] )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

The basic principle is to perform an AVERAGEX over a variable which summarizes the dimension you want the average over, which could be date, category, etc.

Average of measure =
var summaryTable = ADDCOLUMNS( SUMMARIZE( 'Date', 'Date'[Year month]), "@val", [Measure name])
return AVERAGEX( summaryTable, [@val] )
AB_PBI
Frequent Visitor

Thanks @johnt75 !!

Helpful resources

Announcements
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors