Forum Discussion

abc_777's avatar
abc_777
Solution Specialist
2 years ago
Solved

hi

Hello,

 

I have a calendar table. here i want to change the colour of day of week (friday and saturday) to be red and others (sunday. monday, tuesday, wednessday, thrusday) to be black.

 

as well as

 

I want to change the calendar day of month according to friday and saturday to be red and rest would be black

 

Please help me the process if possible

 

 

 

thanks

10 Replies

  • lucadelicio's avatar
    lucadelicio
    Impactful Individual

    Hi abc i'll be happy to help you. Can you post the pbix?

    You have to create a measure to use in the conditional formatting settings.
    Using the dax function Switch you have to scroll the Calendar[WeekDay] and return the color result that you want.
    Try something like this:
    ConditionalFormattingMeasure = SWITCH ( [WekDay], "Friday", "#FF2701", "Saturday", "#FF2701", "#000000")
    https://learn.microsoft.com/it-it/dax/switch-function-dax
    https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

     Luca D'Elicio

    • abc_777's avatar
      abc_777
      Solution Specialist

      lucadelicio ,

       

      thanks for your reply so quick,

       

      I am trying to create a sample file if possible, as it takes time reasoning of the calendar table that i gave in my previous post takes long time to create and has company data in it.

       

      But i will try my best to create.

       

      In mean time i have created a calculative column  using 

      test week color = SWITCH ( [Day Of Week], "Friday", "#FF2701", "Saturday", "#FF2701", "#000000")
       

      then i go to font colour from Cell element menu

       

      please guid me what next

       

       

      thx