Forum Discussion
Average Lines for Legend Values on Same Graph as Original Values
- 6 years ago
Hi Anonymous ,
When using a legend on a line chart (or any other type) the calcuations of the average is based on the all the data an not one for each of the categories of the legend.
In this case you need to create 4 measures 2 for the convertions rates A and B and another for the averages A and B.
Don't know what type of aggregaiton you are using on your model but you can use something similar to this:
Measure A = CALCULATE(SUM(Table[Column]); Table[Category]= "A") Measure B = CALCULATE(SUM(Table[Column]); Table[Category]= "B") Average A = AVERAGEX(ALL(Table[Week]); [Measure A]) Average B = AVERAGEX(ALL(Table[Week]); [Measure B])Be aware that the average values can be calculated in other ways and not only on the averagex but is just a way.
Hi Anonymous ,
When using a legend on a line chart (or any other type) the calcuations of the average is based on the all the data an not one for each of the categories of the legend.
In this case you need to create 4 measures 2 for the convertions rates A and B and another for the averages A and B.
Don't know what type of aggregaiton you are using on your model but you can use something similar to this:
Measure A = CALCULATE(SUM(Table[Column]); Table[Category]= "A")
Measure B = CALCULATE(SUM(Table[Column]); Table[Category]= "B")
Average A = AVERAGEX(ALL(Table[Week]); [Measure A])
Average B = AVERAGEX(ALL(Table[Week]); [Measure B])
Be aware that the average values can be calculated in other ways and not only on the averagex but is just a way.