Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Conditional Formatting of Dates

I have expiration dates as a column. I want the date to turn red if it is within 90 days of today. I would like to do the same with another column "Order by" if it is within 2 weeks.

 

 

  • Anonymous Try creating a flag measure and using it in a rule.

    Flag Measure = 
      VAR __ExDate = MAX('Table'[Expiration Date])
      VAR __Days = (TODAY() - __ExDate) * 1.
    RETURN
      IF(__Days > 90,1,0)

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Anonymous Try creating a flag measure and using it in a rule.

    Flag Measure = 
      VAR __ExDate = MAX('Table'[Expiration Date])
      VAR __Days = (TODAY() - __ExDate) * 1.
    RETURN
      IF(__Days > 90,1,0)