Created on 2020-04-27 06:12
Published on 2020-04-27 06:24
Suppose you want to create a bar chart that displays both the values as absolute numbers and as percentage of the total at the same time.
Power BI does not have a built-in visual that allows you to create something like that. Or does it? Well, follow the simple steps below to trick the “Line and Stacked Column Chart” into doing just that.
1 - Create a measure that calculates the ratio of the selected value and the total of the values in the column. For example:
Measure = sum('Table'[Volume])/CALCULATE(SUM('Table'[Volume]), ALL('Table'[Region]))
2- Add the visual to the canvas and the measure as the line values. Optionally, you can also add the measure to the Tooltips.
3- It's close, but we need to remove the secondary axis and the line from the chart. Go to the Y secondary axis properties and change the color of the axis labels to the same color of your background (white in the example).
4- And, finally, go to the Shapes properties and change the line’s Stroke width to zero.
Done.