Forum Discussion

shoeb1359's avatar
shoeb1359
Helper III
1 year ago
Solved

Conditional Formatting for Only Row Header in Power BI Matrix

Hello Experts,

I need to highlight Header Only Weekend Dates in Matrix visual. Didn't get any option . In below image 2,3,9 and 10 Nov are weekend. 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi shoeb1359 ,

    I create a table as you mentioned.

    Then I create a calculated column and a measure. Here are their DAX codes.

    IsWeekend = IF(WEEKDAY([Date], 2) > 5, "Weekend", "Weekday")
    Color = IF(MAX('Table'[IsWeekend])= "Weekend","Yellow","White")

    Finally you can put the Color measure into Conditional formatting.

     

     

    Best Regards

    Yilong Zhou

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

2 Replies

  • Hi shoeb1359 , You cannot dynamically format column headers in matrix but you can format the values like below visual. Attaching the PBIX: Download PBIX

     

     

    Did I answer your question? If yes, please mark my post as a solution.

     

    Thanks,

    Jai

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi shoeb1359 ,

    I create a table as you mentioned.

    Then I create a calculated column and a measure. Here are their DAX codes.

    IsWeekend = IF(WEEKDAY([Date], 2) > 5, "Weekend", "Weekday")
    Color = IF(MAX('Table'[IsWeekend])= "Weekend","Yellow","White")

    Finally you can put the Color measure into Conditional formatting.

     

     

    Best Regards

    Yilong Zhou

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