Forum Discussion
Need help on Average over Measure
- 6 years ago
Hello DivakarKrishnan , Not very clear about the category over which you want to calculate the Average, but you can refer that category in your DAX, somewhat like below DAX.
DAX = AVERAGEX( KEEPFILTERS( VALUES( 'Your_Table'[Category_Field] ) ), CALCULATE( [Sum of Net Delivery] ) )
where, 'Sum of Net Delivery' is your Main measure.
Let me know, if this works.
If I answer your question, please mark my post as solution, this will also help others.
Hello DivakarKrishnan , Not very clear about the category over which you want to calculate the Average, but you can refer that category in your DAX, somewhat like below DAX.
DAX = AVERAGEX( KEEPFILTERS( VALUES( 'Your_Table'[Category_Field] ) ), CALCULATE( [Sum of Net Delivery] ) )
where, 'Sum of Net Delivery' is your Main measure.
Let me know, if this works.
If I answer your question, please mark my post as solution, this will also help others.
- DivakarKrishnan6 years ago
Helper II
Thanks for your response.
I tried the below code and it's working. Thanks a lot..
AVG of PM = AVERAGEX( VALUES( 'Calendar'[MonthNameShort]) , CALCULATE( [Sum of Net Delivery] ) )- Anonymous6 years agoNot applicableMeasures are always wrapped in CALCULATE automatically by the engine. You never have to do it yourself.