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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sergioquerido
Frequent Visitor

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.