Forum Discussion
Anonymous
3 years agoNot applicable
DATEDIFF within IF
Please could someone tell me why this doesn't work? =if([status]="Closed", DATEDIFF([date_entered],[date_closed],DAY), "Not Closed" ) I wish to calculate the number of days between the dat...
Anonymous
3 years agoNot applicable
Looking at this a little deeper, I believe there is a problem with the source data and it not being in Date format.
I've tried cleaning up the date data but that produces a different error.
- v-yueyunzh-msft3 years ago
Community Support
Hi , Anonymous
If you use the DATEDIFF() function, you must check the first two parameters are "Date" or "Date/Time" format.
If it's not a date format, you can modify your date format in Power Query Editor.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly