cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akj2784 Member
Member

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
Highlighted
Microsoft v-jiascu-msft
Microsoft

Re: Position based coloring of the bar in power BI

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.
akj2784 Member
Member

Re: Position based coloring of the bar in power BI

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors