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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Helper V
Helper V

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
Helper V
Helper V

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
Helper V
Helper V

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Kudoed Authors