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
akj2784
Post Partisan
Post Partisan

Position based coloring of the bar in power BI

Hi All,

 

I have a requirement where user can select any 3 products from the slicer, and the bar/line combo chart should show the bar for each products in different color. 

Is there any way to do it ? If I had code the color to a particular product, it may not work when user selects some other product.

Basically I am looking for Position based color coding of the bar. 1st position red, 2nd position black, 3rd position blue, something like this.

 

Regards,

Akash

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @akj2784,

 

There are two workarounds you can try.

1. Assign a color for each product. 

Position_based_coloring_of_the_bar_in_power_BI

 

2. Add the same column of Axis to the legend.

Position_based_coloring_of_the_bar_in_power_BI2

 

 

Best Regards,

Dale

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

Thanks Dale.

Problem with this approach is if we have thousands of Product, we cannot set colors for all.

And also line and Clustered Column chart does not have legend featue. Is there any other alternative ?

 

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.