Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
rheims
Frequent Visitor

Stacked Bar chart with Dynamic Target

I have a visualization I created in Tableau that I want to recreate in PowerBI.

It is a stacked bar chart with a dynamic target for a budget.  I can't figure out how to create this with full horizontal line across the column for the target. 

I have attached the example I am trying to duplicate from tableau.

rheims_0-1612376701951.png

The best I can get is like this.... The data sets are not the same but you get the idea.

I would really like the red target line to be horizontal lines like the tableau version above.

rheims_1-1612377357431.png

Any ideas?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @rheims ,

 

What you can do is to change the way the line setup is you can do the following:

  • Reduce the size of the line to zero
  • Turn on the Marker
  • Change the marker to line
  • Make the marker as big as you can

Final result below

MFelix_0-1612397917779.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

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

bars.png

 

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

bars-form.png

 

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

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.

 

MFelix
Super User
Super User

Hi @rheims ,

 

What you can do is to change the way the line setup is you can do the following:

  • Reduce the size of the line to zero
  • Turn on the Marker
  • Change the marker to line
  • Make the marker as big as you can

Final result below

MFelix_0-1612397917779.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.