Forum Discussion
Wait Time Calculation
- 2 years ago
Oh OK, DATEDIFF is a DAX function used in PowerBI. You're trying to add a 'custom column' in PowerQuery not a 'calculated column' in PowerBI itself. The equivalent function to calculate duration in minutes between date/time in PowerQuery would be Duration.TotalMinutes
See the solution proposed here: https://forum.enterprisedna.co/t/return-difference-of-two-dates-in-minutes/15174
Alternatively if your dataset isn't huge then adding this as a calculated column to your table in PowerBI using DATEDIFF is still an option.
DATEDIFF works with date or date/time but I suspect it requires a date.
Try:
= DATEDIFF(TODAY() + [ArrivalTime], TODAY()+[ConsultationTime],MINUTE])
You can substitute the actual date instead of TODAY() if you have it, but shouldn't make a difference if arrival and consultation are always the same day.
- Deaviouspeanut2 years agoRegular Visitor
For some reason my BI doesn't recognise the DATEDIFF function at all