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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
fhill
Resident Rockstar
Resident Rockstar

 

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!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @Anonymous,

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.
Anonymous
Not applicable

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

fhill
Resident Rockstar
Resident Rockstar

 

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!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Anonymous
Not applicable

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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