cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Stacked Bar Format: Different Format Across Series AND Categories

Hi,

 

Apologies if this has been posted already but the only answer I could find were doing same color across a given series or not using stack bars at all...

 

I'm trying to reproduce this visual (especially the color scheme) in Power BI (not necessarily using stackbar, any other visual will do)EXCEL_oJGbkC8ksq.png

 

I've been able to create it in excel using a stack bar chart and manually coloring each box (intrested in hint to make it work automatically there as well ;)).

 

This is the data

Aging CategoryTeamIssue Count
< 2 workdaysA7
< 2 workdaysB17
Between 2 and 5 workdaysA2
Between 2 and 5 workdaysB12
> 5 workdaysA4
> 5 workdaysB7

 

Many thanks

 

PS: I'm also not opposed to revisting how I present the data; so far I find that this visual conveys the information in a very clear way, i.e., the issues in green are ok, amber: so-so, red: bad and the split between the teams is clear and the number of issue with each team clearly displayed.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

 

I don't think there's a way to dual-color bar charts in Power BI, but I'll let others respond...

 

Here's one potential work-around that kinda sucks, but should give you what you need.

Color = SWITCH('Table (3)'[Aging Category], "< 2 workdays", 1, "> 5 workdays", 2, "Between 2 and 5 workdays", 3)
Measure_TeamA = CALCULATE(SUM('Table (3)'[Issue Count]), 'Table (3)'[Team] = "A")
Measure_TeamB = CALCULATE(SUM('Table (3)'[Issue Count]), 'Table (3)'[Team] = "B")

 

I've created a Matrix here with Aging Category as Rows, * BLANK * for Columns, then Manually created these two measures above to be added individually to the Values section.  Doing so, allows you to assign DIFFERENT Conditional Formatting to each Set of Measures.  Now for Team B, you can choose darker colors based on the new 'Color' column, and a lighter set of 3 colors for Team A.  ** Sucks if the teams ever swap places, you have to correct the coloring, but it's a work-around for a reason... **

 

image.png

 

fhill_0-1603311826081.png

 



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


Proud to be a Super User helping give back to the community!
Thank You!




View solution in original post

4 REPLIES 4
Highlighted
Super User I
Super User I

 

I don't think there's a way to dual-color bar charts in Power BI, but I'll let others respond...

 

Here's one potential work-around that kinda sucks, but should give you what you need.

Color = SWITCH('Table (3)'[Aging Category], "< 2 workdays", 1, "> 5 workdays", 2, "Between 2 and 5 workdays", 3)
Measure_TeamA = CALCULATE(SUM('Table (3)'[Issue Count]), 'Table (3)'[Team] = "A")
Measure_TeamB = CALCULATE(SUM('Table (3)'[Issue Count]), 'Table (3)'[Team] = "B")

 

I've created a Matrix here with Aging Category as Rows, * BLANK * for Columns, then Manually created these two measures above to be added individually to the Values section.  Doing so, allows you to assign DIFFERENT Conditional Formatting to each Set of Measures.  Now for Team B, you can choose darker colors based on the new 'Color' column, and a lighter set of 3 colors for Team A.  ** Sucks if the teams ever swap places, you have to correct the coloring, but it's a work-around for a reason... **

 

image.png

 

fhill_0-1603311826081.png

 



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


Proud to be a Super User helping give back to the community!
Thank You!




View solution in original post

Highlighted
Frequent Visitor

Thanks a lot for the suggestion but this does not quite cover it as the height of the bar is also relevant.

 

It seems we have either the color or the bars but at the moment we can't combine both.

 

Thanks anyway for the color trick, very neat for other applications

Highlighted
Community Support
Community Support

HI @ggallet,

As fhill said, current you can't achieve this by default power bi visual. I'd like to suggest you take a look at custom visuals in power bi store or try to use r script to manually plot this graph.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Highlighted

Thanks for the confirmation.

 

As far as custom visuals go I couldn't really find any. The closet I came to are the ones from Akvelon but it didn't quite do the trick.

 

I will look into R/Python see what's up.

 

Thanks

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors