Forum Discussion

kkanukurthi's avatar
kkanukurthi
Helper III
1 year ago
Solved

Stack only single bar in bar chart

Hi All,

 

Can anyone please help to represent excel graph same within Power BI simple bar chart. I have excel graph below showing five categories with values. I need to stack only single bar in power BI bar chart showing spend to date+Remaining cost in single bar.

 

Expected output :

I am able to do with 6 bars in Power Bi but my requirement is to stack two bars(spend to date+Remaining cost) in single bar to show total cost at the end of bar in power bi. Below is the Power Bi Bar chart i have tried to do.

 

Please help me. Thanks in Advance

 

 

  • OktayPamuk80's avatar
    OktayPamuk80
    1 year ago

    Can you share me a google drive folder, where I can upload the file? I tried it on my side and it works. Just open it with Power BI Desktop

8 Replies

  • OktayPamuk80's avatar
    OktayPamuk80
    Responsive Resident

    Hi,

    It can be easily implemented, depending however on your data model. If you have fields Type (Original Cost, spend to date, remaining, etc.) and value (100, 80, etc.) you can create a grouping table (excel or enter data in Power BI as new table) like:

    TypeGrouping
    Original CostOriginal Cost
    Spend To Date

    Total Cost

    Remaining CostTotal Cost
    etc.etc.

     

    Connect this new table with the existing one over type. Then you can create a stacked bar chart with Grouping on the  Y axis, Value on X axis and Type on Legend.

     

    Regards,

    Oktay

     

     

    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.

    • kkanukurthi's avatar
      kkanukurthi
      Helper III

      I need same expected output as shown in excel. I want two bars stacked seperately in single line with values and total cost at the end. Please provide a detailed answer please with Pbix file.

       

      Thanks