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
Yogi785
Frequent Visitor

Why a field which a conditional formatting is based on need to be displayed?

Hello,

 

I have a matrix displaying days and Sales. I try to use conditional formating to colorize week ends.

But it works only if the field for conditionnal format is displayed in matrix...and I don't want.

How to do please ? 

I just want CA column with a bakgroundcolor for cells.

withwith2024-03-25_15h46_48.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Yogi785 , In Matrix you can do conditional formatting on only values fields, not on Column or Rows field.

 

For Values, you can use a measure 

 

if( Weekday(Max(Date[Date]),2) >=6, "Grey")

 

and you can use the same 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/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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

View solution in original post

Anonymous
Not applicable

Hi @Yogi785 ,

 

It is possible to apply the created MEASURES directly to conditional formatting, as referenced below:

Measure = IF(MAX('Table'[week_]) >= 6 ,"grey","white")

vkongfanfmsft_0-1711960380711.png

vkongfanfmsft_1-1711960467850.png

 

Best Regards,
Adamk Kong

 

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

4 REPLIES 4
Anonymous
Not applicable

Hi @Yogi785 ,

 

It is possible to apply the created MEASURES directly to conditional formatting, as referenced below:

Measure = IF(MAX('Table'[week_]) >= 6 ,"grey","white")

vkongfanfmsft_0-1711960380711.png

vkongfanfmsft_1-1711960467850.png

 

Best Regards,
Adamk Kong

 

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

 

Hello, thanks for answers, I recreated measures and it works 

amitchandak
Super User
Super User

@Yogi785 , In Matrix you can do conditional formatting on only values fields, not on Column or Rows field.

 

For Values, you can use a measure 

 

if( Weekday(Max(Date[Date]),2) >=6, "Grey")

 

and you can use the same 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/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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

Thanks for reply

yes I use CF on measures. The first screen on the left use a measure ("Mesure") with this formula : "if( Weekday(Max(Date[Date]),2) >=6, "Grey")"

But I don't understand why I should put this measure inside the matrix for the cells of column CA to be colored.. I don't want a column with "grey" strings.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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