Forum Discussion
Anonymous
5 years agoNot applicable
Date difference calculation when it is blank
Hi,
need help on data diff calculation when it is blank.
For row1, I am able to find difference using datediff function.
=datediff(date1,date4,day).
but for remaining rows, when it is blank I am not able to get expected result.
please help.
| region | Date1 | Date2 | Date3 | Date4 | Result |
| A | 7/15/2021 | 8/1/2021 | 8/12/2021 | 8/16/2021 | days between 7/15 and 8/16 |
| B | 7/14/2021 | 7/31/2021 | 8/15/2021 | when date 4 blank, days between 7/14 and 8/15 | |
| C | 7/21/2021 | 7/26/2021 | when date 3 is blank days between 7/21 and 7/26 |
Anonymous , a new column
datediff([date1], coalesce([Date4],[Date3], [Date2]), day)
2 Replies
- amitchandakSuper User
Anonymous , a new column
datediff([date1], coalesce([Date4],[Date3], [Date2]), day)
- AnonymousNot applicable
Perfect. You made my day easy. Thank u so much. amitchandak