Forum Discussion
Max date between two columns and dealing with null values
Hi Community
I have just used the following M Code to try and output the max date of two columns
= List.Max({[Appointment Date]}&{[Appointment Date]})
I used the code provided in the link below.
Solved: How to get a MAX date between two columns in a pow... - Microsoft Power BI Community
However I need help in editing the code so that it deals with null values. As you can see in my example below. I would expect the
#1 null to be 14/03/2023 a (circled below). # 2 null seems to be working
thank you
Richard
- Anonymous3 years ago
Hi,
Perhaps new conditional column could fix it for you? if appointment date equals null then column maxjobnoteaddedwhen else appointment date.
If adding extra column is not an issue for you, this should help.
Kr,
A
2 Replies
- AnonymousNot applicable
Hi,
Perhaps new conditional column could fix it for you? if appointment date equals null then column maxjobnoteaddedwhen else appointment date.
If adding extra column is not an issue for you, this should help.
Kr,
A
- cottreraPost Prodigy
Thank you for responsing so quickly😊