I'm in the middle of a query and need to subtract dates for days between appointments. Some days will equal a negative number based on the dates. I only wish to keep the positive numbers and the negative numbers I don't want to count. I would really like to create a formula where if the number is a negative number it returns a zero or in power query I can change it to a zero in the cell. Any ideas. I created an additional column and subtracted one date column from another and change the type to a duration type. Any assistance would be appreciated.
Thank You,
Gary
Hi Gary,
You can 'Add Column' > Custom Column:
= if [First Date] > [Second Date] then 0 else Duration.Days([First Date] - [Second Date])
Then set the data type as Duration.
Mynda
Thanks Mynda,
I'll try this today. This will be a big help for my ultimate goal.