Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Getting a Target Line on a Stacked Bar Chart

I have a request to show a target line on a stacked bar chart visual. I need a target for each of these six bars as drawn in blue below. I added a measure as a constant line, but that gives me the sum of all six targets and not a unique value for each  bar. I tried overlaying a chart that just had the data label of the goal, but that got a little funky. Any ideas? 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    In the end, I just added a text box with the goal at the end of each bar. The customer wanted a bar chart, not a column and I am limited to the visuals I can use. Thanks all for the suggestions!

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    In the end, I just added a text box with the goal at the end of each bar. The customer wanted a bar chart, not a column and I am limited to the visuals I can use. Thanks all for the suggestions!

  • NimaiAhluwalia's avatar
    NimaiAhluwalia
    Continued Contributor

    Hello Anonymous 

     

    I am not sure whether this is gonna work but just a general idea, you can use the bar line chart and then create a calculated column with the target values and then use it as a line chart to display the targets.

     

    IF MY SOLUTION HELPED YOU PLEASE DO HIT A LIKE AND ACCEPT IT AS A SOLUTION IF IT SOLVES YOUR ERROR!

     

    Regards,

    Nimai Ahluwalia

  • Hi Anonymous,

     

    Here is Stacked Bar Chart with Multiple Target Lines Which will help you to get target lines in stacked bar chart. Hope this helps you.

     

    Stacked Bar Chart with Target Lines, PBIVizEdit.comStacked Bar Chart with Target Lines, PBIVizEdit.com

     

     

     

     

     

     

     

     

     

    Download link for the custom visual file in this page,

    https://pbivizedit.com/gallery/stacked-bar-chart-with-multiple-target-lines 

     

    This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,

    • anyone, irrespective of technical skills, can create their own visuals
    • 15 minutes to create a visual from scratch
    • opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)

    Give this a shot and let us know if you face any problem/errors.
    You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in editor).

    Thanks,
    Team PBIVizEdit

    • Anonymous's avatar
      Anonymous
      Not applicable

      That looks like what we need, but unfortunately, I do not work for a company where I can download custom visuals or pay for one that requires a subscription.