Forum Discussion
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
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
- OktayPamuk80Responsive 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:
Type Grouping Original Cost Original Cost Spend To Date Total Cost
Remaining Cost Total 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.
- kkanukurthiHelper 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
- kkanukurthiHelper III
OktayPamuk80 Thankyou. Can you please give me sample pbix file please
- OktayPamuk80Responsive Resident
here is an example, which you can recreate using your data.
https://drive.google.com/drive/folders/1-1hilkkcjEjc451A7XMAVJtU701LqY3W?usp=sharing
- kkanukurthiHelper III
Hi OktayPamuk80 im not able to download the above link for some reason. Can you please share me .pbix file.
- OktayPamuk80Responsive Resident
Hi,
Can you retry? I shared the file with you and received a request for acces, which I approved.
https://drive.google.com/drive/folders/1-1hilkkcjEjc451A7XMAVJtU701LqY3W?usp=sharing
I can't put the file here, it's not possible.
Regards,
Oktay