Forum Discussion
DATEDIFF with blank dates
- Anonymous9 years ago
What days do you want to return for those blank end dates? If you want to return the days between start date and today when the end date us blank, you can use the following DAX to calculate age of the record.
Column = IF(ISBLANK(Table[End Date]),DATEDIFF(Table[Start Date],TODAY(),DAY),DATEDIFF(Table[Start Date],Table[End Date],DAY))
Regards,
What days do you want to return for those blank end dates? If you want to return the days between start date and today when the end date us blank, you can use the following DAX to calculate age of the record.
Column = IF(ISBLANK(Table[End Date]),DATEDIFF(Table[Start Date],TODAY(),DAY),DATEDIFF(Table[Start Date],Table[End Date],DAY))
Regards,
hello - instead of using TODAY is there a way to calculate it from date slicer.
Column = IF(ISBLANK(Table[End Date]),DATEDIFF(Table[Start Date],TODAY(),DAY),DATEDIFF(Table[Start Date],Table[End Date],DAY))
Thank you.