Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Overlap bars in clustered chart

Hi community!

I am trying to create a clustered bar chart that shows the total points vs accepted points for tickets in a bar plot. The dataset has ticket name, accepted points, total points and target date. When I drag and drop accepted and total points in the x-axis and ticket name in the y-axis, I see bars side by side to each other. I understand that's how a clustered bar chart works. But I want to display the bars overlapping one another and add a constant line for target date which should be set to today.

What I have now:


What I want: (This plot was generated using Python code and I am trying to achieve this in Power BI



Any help is much appreciated. Thanks!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi there,
    To achieve this in Power BI, you have to use slightly different logic. What you will need is a measure that calculates the difference between the accepted and remaining values rather than use the totals and overlap the columns. You will then use this calculated measure as the new "Remaining" value and put them into a "Stacked Column Chart" together.

    If this doesn't work, you could upload a sample file and I can try offer another solution.

    Good luck!

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi there,
    To achieve this in Power BI, you have to use slightly different logic. What you will need is a measure that calculates the difference between the accepted and remaining values rather than use the totals and overlap the columns. You will then use this calculated measure as the new "Remaining" value and put them into a "Stacked Column Chart" together.

    If this doesn't work, you could upload a sample file and I can try offer another solution.

    Good luck!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi! Thank you so much for the response

       

      The logic works. But PowerBI automatically shows the values in % instead of just points. How do I tackle that?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey! 
    Great to hear it works. Not sure exactly the issue, but it could be that you have selected the "100% Stacked Column Chart" instead of the "Clustered Column Chart". Could you look at the visual selector pane and see if there is another option?