Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Double Stacked Bar Graph

Hello friends, I need your help, I am new to Power BI and I have a problem with stacked bars, the problem is that I have to 3 measures, 1 measure that is a budget, which goes alone, another measure that is what is spent + what is projected, obviously these 2 measures must be stacked and that are related to the measure of budgets. currently I am graphing the measurements by separators, on the 1 hand only the budget and on the other hand the 2 stacked measures, I have to move the length manually, but when updated, I lose the relationship and it messes them up again. ideally, they should be in a single graph, but I can not leave them as I want. the photo I show is like I need them to be in 1 only graph. grateful from now on with the solutions.

apiladas 1.png

1 ACCEPTED SOLUTION

Hi  @Syndicate_Admin ,

Click Home - Enter data. to create a table.

vyangliumsft_0-1646874629743.png

Create measure.

Gastado&Liberadas =
IF(
MAX('Table2'[Group])="Gastado&&Liberadas",0,[$ Liberadas S/Fact])
PPTO =
IF(
    MAX('Table2'[Group])="PPTO",0,[PPTTO])

Result:

vyangliumsft_1-1646874629745.png

 

 

Best Regards,

Liu Yang

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

View solution in original post

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Hi  @Syndicate_Admin ,

Here are the steps you can follow:

1. Use Enter data to create a table.

vyangliumsft_0-1646381709229.png

2. Create measure.

Stacked1 =
IF(
MAX('Table2'[Group])="PPTO",0,[PPTTO])
Stacked2 =
IF(
    MAX('Table2'[Group])="Gastado&&Liberadas",[Gastado],[$ Liberadas S/Fact])

3. Result:

vyangliumsft_1-1646381709231.png

 

Best Regards,

Liu Yang

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

Estimado Liu Yang:

reviewing the steps to follow, I do not know how to create or edit the groups in step 1. you can indicate some forum or video to see the steps, I would appreciate it. thank you now.

Hi  @Syndicate_Admin ,

Click Home - Enter data. to create a table.

vyangliumsft_0-1646874629743.png

Create measure.

Gastado&Liberadas =
IF(
MAX('Table2'[Group])="Gastado&&Liberadas",0,[$ Liberadas S/Fact])
PPTO =
IF(
    MAX('Table2'[Group])="PPTO",0,[PPTTO])

Result:

vyangliumsft_1-1646874629745.png

 

 

Best Regards,

Liu Yang

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

Dear:

The proposed solution is the one indicated, it was what I needed, the only bad thing is that the data was changed. as indicated on the sheet in the example sheet. the PPTO data = 63.8 mm and goes alone. I don't know how to fix it. I could indicate some video or some forum of how I make this solution, I am interested in learning.

pbastidap_0-1646703167835.png

https://mega.nz/file/6o4GmQqY#IrXsps7VESQ6b4d9e9_x9Q0Q9XdDFDTTy76BVCHa26k

VijayP
Super User
Super User

@Syndicate_Admin 

 

It might be possibel based the datamodel one created . For Example if you look at below snapshot

the Table structure created to accomodate values the you want in a single graph for Budget and Actul+Forecast

If you can share the pbix , I may try to help you with more details

VijayP_0-1646194705051.png

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Something like that is what I need, I share my pbix, to see if you can help me. I would be grateful. same any suggestion to my model and pbix would appreciate it, it is my first dashboard.

https://mega.nz/file/6l4AyTgJ#-CVsjVclykJtINYQHNjJ1biiIkFcQe3Lihx4YFrNqt8

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.