Forum Discussion
Stacked Bar chart with Dynamic Target
Hi rheims
Download this PBIX file with sample data and visual.
You can create a measure to be used as your target. For this example I've just used this
Measure = (SUM('Table'[AAT])+SUM('Table'[NC])+SUM('Table'[Supp])+SUM('Table'[Travel])) * 0.85
Add the measure as the line value.
Turn on Data Labels, turn off Show Background and turn on Customize series
Set the line color to something that stands out (excuse the colors below, they're not easy on the eye)
Under Shapes set the Stroke width to 0 and you don't need markers
You should have something like this
Now click on the Measure and in the Format area of the Ribbon type over the current format with this
■■■■■■■■■■;
and hit Enter. Note the ; at the end of that string
The numbers/labels for the measure will now be the characters you just typed in
What this is doing is using a Custom Format string to format positive values. I'm using the character ALT+254 which is ■ but you can use any symbol you like.
Further info https://www.myonlinetraininghub.com/custom-formatting-strings-in-power-bi
Regards
Phil
When I try this I can get the line to show up but the marker does not go away. Also the lines shows higher that it should on the left hand axis. so it is off as the label is place above the actual mark where it should be.