Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
I would like to make bar chart where customersatisfaction is based on percentage so that it is scaled based on max value.
So Toyota have 100% satisfaction and Nissan 50%.
CustomerName, TimeStamp, CustomerSatisfaction
Nissan, 2016-12-1, 65
Toyota, 2016-12-1, 130
How to do?
Solved! Go to Solution.
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.
Here is the sample pbix file for your reference.
Regards
You have to create 2 measures . 1 measure to find the max value and 2 nd measure to divide with the max value
1. MaxCustomer Satisfaction = CALCULATE(MAX(CS[Customer Satisfaction]),ALL(CS[Customer Name]))
2. CustomerSatisfactionPercentage = DIVIDE(SUM(CS[Customer Satisfaction]),[MaxCustomerSatisfaction])
I tried, but not looking good.
Is it so that purpose of MaxCustomerSatisfaction is add value "130" to each row as reference value? (basically highest value of all)
And is it so that purpose of CustomerSatisfactionpercentage is show percentage of the row compared to MaxCustomerSatisfaction like 100% or 50%
What I see is that MaxCustomerSatisfaction value for each row is varying and highest value is 1.
Hi @Anonymous,
The formulas provided by Thiyags should work. You should use the formulas to create two measures instead of calculate column.
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.
Here is the sample pbix file for your reference.
Regards
User | Count |
---|---|
90 | |
88 | |
87 | |
79 | |
49 |
User | Count |
---|---|
153 | |
145 | |
106 | |
74 | |
55 |