Forum Discussion
Percentage based bar chart?
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?
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
5 Replies
- ThiyagsHelper II
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])
- AnonymousNot applicable
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.
- v-ljerr-msftMicrosoft Employee
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.:smileyhappy:
Regards