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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
spartanboy
Helper II
Helper II

How to Fix Column Colors

Hello,

 

Here the slicer is structured in a way to only select 2 values at anytime. Irrespective to the dates or month selected, the color legend should be the same. How can I fix the first column to alaways be "Black" and the second column to be "Yellow"?

 

spartanboy_0-1658236577233.png

 

Thanks,

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @spartanboy ;

You could create a condition measure . then set condition format.

condition = IF(MAX('Table'[Date])=CALCULATE(MIN('Table'[Date]),ALLSELECTED('Table')),"Black","Yellow")

Then set it.

vyalanwumsft_0-1658473488430.pngvyalanwumsft_1-1658473496449.png

The final show:

vyalanwumsft_2-1658473515053.png


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

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @spartanboy ;

You could create a condition measure . then set condition format.

condition = IF(MAX('Table'[Date])=CALCULATE(MIN('Table'[Date]),ALLSELECTED('Table')),"Black","Yellow")

Then set it.

vyalanwumsft_0-1658473488430.pngvyalanwumsft_1-1658473496449.png

The final show:

vyalanwumsft_2-1658473515053.png


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

amitchandak
Super User
Super User

@spartanboy , if you are using legend you can not fix the color, it will choose from top colors.

 

For Just axis with one measure and no legend, You can create a color measure and use that in conditional formatting using the field value option

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

 

If this does not help
Can you a sample pbix after removing sensitive data.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak While in another example below, MONTH is a legend. What do you mean by top colors? do you mean default colors?

 

spartanboy_0-1658250289099.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors