Forum Discussion

sy898661's avatar
sy898661
Helper V
7 years ago
Solved

Help with DAX changing colors

Hi!   I am trying to change the color of cells in a Table visual based off of some criteria, and althought I have not learned DAX, I have attempted to write a measure to help with this. Can someone...
  • parry2k's avatar
    7 years ago

    sy898661 try following

     

    Actual Date Color Change =
    IF  (
           'Date'[Planned Date] < TODAY &&  
           'Date'[Actual Date] == BLANK(),  "#FF0000" 
    )
  • BeeBeeJay's avatar
    7 years ago

    If you add a calculated column to your data table:

     

    the_color = IF(AND( MyData[PlannedDate] < TODAY() , ISBLANK(MyData[ActualDate]) ) , "#112233" , "#00AA00")

     

    You can then use the conditional formatting option in the table visualization for the Actual Date column to set its background colour to the value of the "the_colour" calculated column.

     

    Hope this helps.