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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CMSGuy
Helper III
Helper III

Weekend Row color

I have a table where I would like the background of a cell to be gray if it is a weekend.  The whole row would be gray if it is a weekend.  I go into do conditional formatting based on a calculated column I have in the calendar table.  This column is called IsWeekend and will either be a Zero or a One.  However when I go to set up that conditional column, the field is grayed out and cannot be selected.  What is happening here?  What am I doing wrong?  Also, I want this gray color whether there is data or not.

CMSGuy_0-1657537680859.png

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @CMSGuy 

Thanks for reaching out to us.

>>However when I go to set up that conditional column, the field is grayed out and cannot be selected.  What is happening here?  What am I doing wrong? 

You need to createt a measure instead of conditional column, for example,

Measure = IF(WEEKDAY(MIN('Table'[date]),2) in {6,7},"grey")
 

vxiaotang_1-1657867226934.png

vxiaotang_2-1657867256931.png

result

vxiaotang_3-1657867269277.png

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

6 REPLIES 6
v-xiaotang
Community Support
Community Support

Hi @CMSGuy 

Thanks for reaching out to us.

>>However when I go to set up that conditional column, the field is grayed out and cannot be selected.  What is happening here?  What am I doing wrong? 

You need to createt a measure instead of conditional column, for example,

Measure = IF(WEEKDAY(MIN('Table'[date]),2) in {6,7},"grey")
 

vxiaotang_1-1657867226934.png

vxiaotang_2-1657867256931.png

result

vxiaotang_3-1657867269277.png

 

Best Regards,

Community Support Team _Tang

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

CMSGuy
Helper III
Helper III

Would I need to do like an outer join to select ALL dates? 

CMSGuy_1-1657538841781.png

 

Dhacd
Resolver III
Resolver III

In Conditional Formatting Choose rules instead of a field value and apply the conditions there.
If it is not working Please share a sample dataset and I will have a look.


If this is working for you please mark it as a solution.

Regards,

Atma

How can I share a dataset with you? 

amitchandak
Super User
Super User

@CMSGuy , Field value need a text measure that return color

 

example 

 

if(Max('Date'[Weekend]) =1 , "Grey", "White")

 

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/...

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 the reply @Dhacd .  What do I do if no data was entered for that day?  This is a sample with some test data and only one day for this month of July has data.  

CMSGuy_0-1657538623999.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.