Forum Discussion
Clustered column chart (percentage)
Hi All!
In the below graph, I want to show 'Achieved Qty' as a percentage of 'Target'.
Eg:- For product D, I want to show 70% (i.e. 210/300) in the graph.
Is there any option to do this or is there any other custom visual to do this?
Thank you!
Hi Anonymous,
you need to define your 'Achieved%' as a measure using e.g.:
Achievement% = CALCULATE(SUM('Sales Table'[Achieved Qty]);'Sales Table'[SM Code])/CALCULATE(SUM('Sales Table'[Target]);'Sales Table'[SM Code])The measure needs to be formatted as '%'.
The resulting chart looks like this:
The visual settings:
That's because you added a 'column', not a 'measure'. Makes a difference - as you can see. Make sure to add 'measure':
10 Replies
- v-ljerr-msft
Microsoft Employee
Hi Anonymous,
I don't think it is possible to do it currently. However, you can create a new measure to calculate the percentage of 'Target' and show it on the Tooltip. When hovering over a data point on the visualization, the percentage of 'Target' will be shown on the Tooltip like below.
Regards
- AnonymousNot applicable
Dear v-ljerr-msft and skasper,
Thank you for your valuable suggestions. But my actual situation is like this:
I want to visualize each Sales Manager's (ABC and XYZ) Achieved Qty, Target and Achieved Qty as a percentage of Target.
Eg: For the Sales Manager XYZ, Achieved% should be (150+100)/(200+150) = 71.4%
But in both 'Tooltip' method and 'Line and clustered column chart' method, it shows as 141.67% (i.e. 75%+66.67%).
Is there any suggestion to do this please?
- skasper
Responsive Resident
Hi Anonymous,
you need to define your 'Achieved%' as a measure using e.g.:
Achievement% = CALCULATE(SUM('Sales Table'[Achieved Qty]);'Sales Table'[SM Code])/CALCULATE(SUM('Sales Table'[Target]);'Sales Table'[SM Code])The measure needs to be formatted as '%'.
The resulting chart looks like this:
The visual settings:
- skasper
Responsive Resident
Hi,
you can do this, if you are ok with showing the percentage values as a line. To do so select the visual type 'Line and Clustered Column Chart'
You will then get a chart like this with the percentages on a second Y-Axis:
- atulankyFrequent Visitor
I have the same requirement but struggling with it.
As shown in the below image created one measure to calculate the hours % based on BMI manhours against the BMcD manhours
Eg. BMI manhours in green 40135 and BMcD manhours in black 1025307, and want to display 3.91% on line chart.