Forum Discussion
Percentage based bar chart?
- 9 years ago
Hi Anonymous,
I have tested it on my side, your formula works fine for me. Note: make sure you have change the Type of Y-Axis to Categorital in Format tab for the bar Chart.:smileyhappy:
Here is the sample pbix file for your reference.
Regards
Sorry. You advice seems to be very correct. But could not apply as I used to simple scenario.
This is the real case.
emotionTable
PartitionKey, RowKey, Timestamp, Happiness
000000000001,1, 05/12/2016 13:01:01, 0,9999
000000000002,2, 05/12/2016 14:02:01, 0,0100
000000000003,3, 05/12/2016 15:03:01, 0,0001
000000000004,4, 05/12/2016 16:04:01, 0,0100
000000000005,5, 05/12/2016 16:05:01, 0,0001
000000000006,6, 06/12/2016 13:01:01, 0,0001
000000000007,7, 06/12/2016 13:02:01, 0,0200
000000000008,8, 06/12/2016 14:03:01, 0,0001
000000000009,9, 06/12/2016 14:04:01, 0,0300
0000000000010,10, 06/12/2016 13:04:01, 0,0100
Measures:
MaxHappiness = CALCULATE(MAX(emotionTable[Content.Happiness]),ALL(emotionTable[Timestamp]))
HappinessPercentage = DIVIDE(SUM(emotionTable[Content.Happiness]),[MaxHappiness])
I expected that all bar in chart in MaxHappines would be 0,999(row1) to be used as referenced value.
But what I see is all bars showing value 1.0. Obviouly something wrong with my MaxHappiness measure.
Target raports:
1) I see happiness percentage per timestamp. (Tells happiness by moment)
2) I see happiness average happiness percentage by hour. (I see happiness level by hour)
Hi Anonymous,
I have tested it on my side, your formula works fine for me. Note: make sure you have change the Type of Y-Axis to Categorital in Format tab for the bar Chart.:smileyhappy:
Here is the sample pbix file for your reference.
Regards