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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
DivakarKrishnan
Helper II
Helper II

Need help on Average over Measure

Dear,

 

I have couple of DAX written in my model, now i want to calculate average for specific items over this measure. As you know Average DAX is taking only table column and not the measure. Please guide me on how to take average over this below measure.

 

Main Measure : Need average over this Sum of Net Delivery Measure.

Sum of Net Delivery = [SUM of Total Delivery] - [SUM of Total Reversal Delivery]
 
SUM of Total Delivery = SUMX(FILTER('Total Delivery Summary',  'Total Delivery Summary'[SAP_Delivery_Status_Movement Type]="601"),'Total Delivery Summary'[Total SUM])
SUM of Total Reversal Delivery = SUMX(FILTER('Total Delivery Summary',  'Total Delivery Summary'[SAP_Delivery_Status_Movement Type]="602"),'Total Delivery Summary'[Total SUM])
1 ACCEPTED SOLUTION
bhagyashripatil
Advocate I
Advocate I

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.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

[Avg Over Items] =
averagex(
    values( ItemsDimension[ItemId] ),
    // Please note that if
    // [your measure] = BLANK() for
    // some ItemId, then this value
    // will NOT be taken into account.
    // If you want to treat BLANK() as
    // 0 and do include it in the calculation
    // you have to add 0 to the measure:
    // [your measure] + 0
    [your measure]
)
bhagyashripatil
Advocate I
Advocate I

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.

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] ) )
Anonymous
Not applicable

Measures are always wrapped in CALCULATE automatically by the engine. You never have to do it yourself.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.