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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
RyanThorsen
Frequent Visitor

Stacked Bar Chat with 2 Measures

Hi, I am trying to create a bar chart with 2 measures side by side in Power BI and can't figure it out. Below is what I am trying to accomplish. I tried even creating a measure in Power BI that pulls both Measures together (below) and that works fine with a Matrix, but I can't get it to work for a bar chart, any thoughts?

Combined Measure =
    switch(
        true(),
        SELECTEDVALUE('xxx) = "Y",  format([% Total], "0.0%"),
        SELECTEDVALUE(yyy) = "N", format([count], "#,0")
        )

 

RyanThorsen_1-1729189100673.png

1 ACCEPTED SOLUTION
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

No, that won't work. Play around with charticulator. By using this, you can have very customized visuals for your needs. A good tutorial and other examples you can get from:

https://www.youtube.com/watch?v=100RnpiOgYA&t=3s

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.

View solution in original post

3 REPLIES 3
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

No, that won't work. Play around with charticulator. By using this, you can have very customized visuals for your needs. A good tutorial and other examples you can get from:

https://www.youtube.com/watch?v=100RnpiOgYA&t=3s

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.

OktayPamuk80
Responsive Resident
Responsive Resident

Hi Ryan,

I think you are trying to get measures to be in the legend part of a bar chart. That won't work. It will only work if you have a dimension (non calculation field). There is a nasty workaround to get that. This depends on your datamodel of you need complicated dax.

I would go using a matrix or table using option Cell elements-> Data bars. By this you can have the bars in the cells and by customizing the grid options (higher rows, wider measure columns, you can achieve a performant and pleasing result.

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.

Thanks, is there a way to change the colors of the data bars in a matrix or do they all have to be the same? I see you can change the positive and negative, but i'd like to have them like the legend colors in my example above, not sure if that is possible in a matrix?

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.