Forum Discussion

HR3038511's avatar
HR3038511
Helper I
2 years ago
Solved

Target Line in Stacked Bar Chart on same scale

Hi, 

 

In my stacked bar chart I'd like to have the target line on the same scale as the bars. Currently my target line is out of scale with the bars.  The target is 100 so i want it to be on the hight of 100 on the Y-axis so I can correctly see which bars are above 100. 

 

This is what I have currently:

 

Here you can find the example file: https://easyupload.io/fb6usj

 

Thanks!

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi HR3038511 ,

    I see what you mean, but with Power BI Desktop, you can manually change it depending on how many you want to join. If you want to be dynamic, you can choose the FX next to it to write it.

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi HR3038511 ,

    I opened your .pbix file. I think you can go to Format visual and then choose Secondary y-axis.

    Then you can set the Range to 0-1000.

    Finally you will see what you want.

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Uzi2019's avatar
    Uzi2019
    Community Champion

    Hi HR3038511 

     

    You can set the min and max value same for both Y axis and secondary Y axis.

     

    set same value for  secondary Y axis.

     

     

    I hope  I answered your question!

     

     

  • Anonymous The problem here is that over time there will be additional bars with values greate than 1000. So fixing the scale on the second axis won't do the job because the X axis scale might change. Any idea how to work around this?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi HR3038511 ,

      I see what you mean, but with Power BI Desktop, you can manually change it depending on how many you want to join. If you want to be dynamic, you can choose the FX next to it to write it.

       

       

       

      Best Regards

      Yilong Zhou

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.