Forum Discussion
Conditional Formatting Past Due Date
- 3 years ago
It should be :
FormatColour = IF(Today() >= [Date_due], "Red")
tells us if it works
There is a function called TODAY() that will return the curernt day (in UST time), which you can add (time zone offset / 24) to, depending on your timezone.
So you can create a measure like so:
FormatColour =
var todayInYourTimeZone = TODAY + (timezoneOffset / 24)
return IF(todayInYourTimeZone >= [Date_due], "Red")
And use conditional formatting on your table to format the cells where the cell is overdue.
- inglexjc3 years agoPost Patron
I am getting an error when creating this measure: "Failed to revolve name 'TODAY'. It is not a valid table, variable, or function name." Suggestions?
- AilleryO3 years agoMemorable Member
Hi,
TODAY is a function so needs parenthesis : TODAY()
To add to inglexjc answer, notice taht the TODAY() date is the one from the machine where the report is running, ie :
your PC when on Power BI Desktop
or the server on Power BI Service (and then it depends on the location of the server...).
You can check this location in Power BI admin.
Hope it helps