Forum Discussion
StevenHarrison
Resolver I
4 years agoDates - Future, Past and Blank (null) - conditional formatting
Hi Guys - I have a [NEXT DATE] column with Future, Past and null dates (in Power Query Editor displayed as null and as (Blank) in Data view).
I want to be able to conditionally format a table visualisation to display
- Future dates as 'Not Due'
- Past dates as 'Overdue'
- null or blank as 'N/A'
any thoughts on a DAX or power query solution appreciated
Hi - Probably did this the long way round but created a custom column called Due Service?
New 'Due?' column in the data view:
Then used that for the conditioning on the NEXT DATE column:
This seems to work, thanks for the feedback.
7 Replies
- Samarth_18
Community Champion
Hi StevenHarrison ,
You could create a column as below:-
column = SWITCH ( TRUE (), [next date] < TODAY (), "Overdue", [next date] >= TODAY (), "Not Due", ISBLANK ( [next date] ), "N/A" )BR,
Samarth
- StevenHarrison
Resolver I
Hi Samarth - The entry for the ISBLANK entry returns Overdue:
- Samarth_18
Community Champion
StevenHarrison ,Please try this:-
column = SWITCH ( TRUE (), [next date] < TODAY (), "Overdue", [next date] >= TODAY (), "Not Due", [next date] = BLANK() , "N/A" )