Forum Discussion

CMSGuy's avatar
CMSGuy
Helper III
4 years ago
Solved

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.

 

  • 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")
     

    result

     

    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.

6 Replies

    • CMSGuy's avatar
      CMSGuy
      Helper III

      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.  

       

  • Dhacd's avatar
    Dhacd
    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

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

     

  • v-xiaotang's avatar
    v-xiaotang
    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")
     

    result

     

    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.