Forum Discussion
Conditional formatting for Date fields in PowerBI
There will be 2 columns in a powerBI table which are Column Date 1 and Column Date 2.
Suppose if Date 2 is greater than Date 1 than I wanted Date 2's font color to be highlighted in Green
if Date 2 is lesser than Date 1 than Date 2's font color should be highlighted to Red.
Could this be possbile with date columns?
Cshenoy , Create a color measure like
if( max(Table[Date1]) > max(Table[Date2]) , "green", "red" )
And use that in conditional formatting with field value option
For steps, if needed
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
1 Reply
- amitchandakSuper User
Cshenoy , Create a color measure like
if( max(Table[Date1]) > max(Table[Date2]) , "green", "red" )
And use that in conditional formatting with field value option
For steps, if needed
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values