Forum Discussion

Oana's avatar
Oana
Advocate I
5 years ago
Solved

Conditional Formatting for Dates

Hello All:    I have a table with permits, and need to find a way to apply conditional format to two columns with dates: Original Submittal Date and Approval Date, based on today's date, with two c...
  • Oana's avatar
    Oana
    5 years ago

    amitchandak I could not create a measure as you typed using the IF function, the measure could not reference a column in a table, however, I did use the function you typed to create a calculated column, instead of "Red" I used "1" and instead of "Yellow" I used "2". Prior to adding the table column I created a measure someone else suggested in a post, Anonymous , the measure is Today = TODAY(). Then the formula I used was this: 

    Past Due/Within 7 Days Submittal = IF('Table'[Original Submittal Date] < [Today] && 'Table'[Original Submittal Date Status]="F",1,IF('Table[Original Submittal Date] >= [Today] && 'Table[Original Submittal Date] <= [Today]+7 &&'Table[Original Submittal Date Status]="F",2,0))
    The last step is to select the conditional formatting for the Original Submittal Date, selected Format by Rules, based on field  Past Due/Within 7 Days Submittal, and if the number was 1 I chose a red format, if the value was 2 I chose a yellow format. And that did it! 
     
    Thank you both, amitchandak and Anonymous