Forum Discussion
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]).
Thank you
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])))
4 Replies
- mickey64Super 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
- sergioqueridoHelper I
EXPANDALL function is not working. Thank you.
- ahadkarimiSolution 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])))- sergioqueridoHelper I
Nice solution. Worked. Thank you!