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
sergioquerido
Helper I
Helper I

Total Average Not Correct

Hi,

How can i correct the total avarages of the table for each measure? As you can see in figure attached the total averages of the table is not correct. For instace, the Total Average of variabl "TD" should be 28,34% and not 25,2. 
The code for that measure is: %_TD = DIVIDE([Day_TD],[Final_MatchReferenceTD]).

Example.png

Thank you

1 ACCEPTED SOLUTION
ahadkarimi
Solution Specialist
Solution Specialist

Try this one and let me know the result:

%_TD =
IF( HASONEVALUE(Table[Player]),
DIVIDE([Day_TD],[Final_MatchReferenceTD]),
AVERAGEX(
VALUES(Table[Player]),
DIVIDE([Day_TD],[Final_MatchReferenceTD])))

View solution in original post

4 REPLIES 4
ahadkarimi
Solution Specialist
Solution Specialist

Try this one and let me know the result:

%_TD =
IF( HASONEVALUE(Table[Player]),
DIVIDE([Day_TD],[Final_MatchReferenceTD]),
AVERAGEX(
VALUES(Table[Player]),
DIVIDE([Day_TD],[Final_MatchReferenceTD])))

Nice solution. Worked. Thank you!

mickey64
Super User
Super User

For your reference.

Please use 'EXPANDALL' function.

 Ex.) Average of leaf level = EXPANDALL(AVERAGE([%_TD]), ROWS)

 

Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

EXPANDALL function is not working. Thank you.

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.