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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dphillips
Helper IV
Helper IV

Average of Sub Totals

Average of SubTotals 1.JPGHere is a table showing Students, BOSUnits and a sub total for each student which is the sum of BOSUnits. I would like to get the average of each of the subtotals. (In the example shown it would be (10+11+11+11 + etc / n) Also - this is only for 2017. I would also like to be able to compare the average Number of Units done by a student across a number of years.

 

Not sure how to do this in DAX and would love some help.

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @dphillips,

 

If I understand you correctly, you should be able to use AVERAGEX and SUMMARIZE function(DAX) to create a measure to calculate the average in your scenario. However, without knowing your real table structures, it's hard to write the measure for. So the formula below is for your reference. Smiley Happy

Measure =
AVERAGEX (
    SUMMARIZE ( 'Table1', 'Table1'[Students], "adc", SUM ( 'Table1'[BOSUnits] ) ),
    [abc]
)

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @dphillips,

 

If I understand you correctly, you should be able to use AVERAGEX and SUMMARIZE function(DAX) to create a measure to calculate the average in your scenario. However, without knowing your real table structures, it's hard to write the measure for. So the formula below is for your reference. Smiley Happy

Measure =
AVERAGEX (
    SUMMARIZE ( 'Table1', 'Table1'[Students], "adc", SUM ( 'Table1'[BOSUnits] ) ),
    [abc]
)

 

Regards

Thanks - exactly what I was after!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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