Forum Discussion
Average Line on Scatter Displaying Wrong Value
The calculation method of the Average Line should be like the following DAX formula. So the Average Line is averaging each YoY % for each visible Business.
Avg = AVERAGEX ( ALL ( Table1 ), [YoY % measure] )
To get your expected Avg result, we need to use the DAX formula like below. But we can only show it in some other visuals (e.g. Line chart) using a separate line, because it will clear all filters.
Avg_All =
(
CALCULATE ( SUM ( Table1[2016 Weeks] ), ALL ( Table1 ) )
/ CALCULATE ( SUM ( Table1[2015 Volume] ), ALL ( Table1 ) )
- 1
)
It seems not to be a bug but an expected logic in current version. I found a same idea here, if you have the same desire, you can vote it.
Best Regards,
Herbert
Firstly, thank you for taking the time to advise! I really appreciate it.
Yes I have been trying to think of a suitable DAX formula to achieve the result I wanted, but the scatter at present doesn't allow us to use any other measures than those already plotted on the scatter.
An alternative would be to allow the user to specify that a measure being used by an Average Line is of type ratio so it would compute its value appropriately.
And yes it was unfair of me to describe it as a bug since I can see why it behaves so; for example if I put [2016 Weeks] on the scatter and add Average Line, it will give me correct average.
The idea you found was posted by me. Scatter plots are really powerful visualisations and I hope in future releases they allow us to customise them more. For now I'll continue to use Median Line instead on scatter. At least median is arguably more representative of the 'average'.
Thanks for the helpful reminder about iterator functions!
Kind regards
Mohammed