Forum Discussion
How to de-mean Bar Chart?
- 4 years ago
Ok, that makes way more sense.
Try:
Values minus mean for measure 1 = VAR _Mean = AVERAGEX ( ALLSELECTED ( Table[Decile] ), [Your measure] ) RETURN IF ( NOT ( ISBLANK ( [Your Measure] ) ), [Your Measure] - _Mean )
In that case:
Values minus mean for measure 1 =
VAR _Mean = DIVIDE([Measure 1] + Measure 2] + Measure 3] ...and so on upto Measure 10] , 10)
RETURN
[Measure 1] - _Mean
and repeat for each of the measures
You can't make it dynamic with your structure
- qngu4 years agoFrequent Visitor
Sorry, I mis-understood you when you said each bar is a measure. Each bar is is calculated using a single measure. A simple example:
Table1
Date | Value | Decile
1/1/2000 | -8 | '1'
1/1/2001 | -8 | '1'
1/1/2000 | -4.5 | '2'
1/1/2001 | -4.5 | '2'
....
Measure_1 = sum(Value) is set as the y-values and the x-values is set with the Decile column. So for decile 1, the measure will be -8+-8=-16, which is what we see in the bar chart and so on for each decile.
So there's only 1 measure, not 10. Sorry for the mis-understanding.
- PaulDBrown4 years agoCommunity Champion
Ok, that makes way more sense.
Try:
Values minus mean for measure 1 = VAR _Mean = AVERAGEX ( ALLSELECTED ( Table[Decile] ), [Your measure] ) RETURN IF ( NOT ( ISBLANK ( [Your Measure] ) ), [Your Measure] - _Mean )- qngu4 years agoFrequent Visitor
Awesome. Thanks for the solution, I was looking for this and accepted this as the solutin as well.