Forum Discussion
Calulcate Total Time difference between two datetimes
Hi ,
I am working on a measure which calculates the total time difference between datetime columns in power bi.
I am using the below custom column to get this but my issue is that this creates a text type column which will not allow me to sum.
=Duration.ToText([AlarmClearedUTC]-[AlarmSentUTC])
Is there a way to get the time difference between datetimes which will then allow me to sum this up in a measure ?
- Anonymous6 years ago
Hi Arranafc19 ,
You can use "datediff" function for calculation.
Here is the reference:
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
2 Replies
- AnonymousNot applicable
Hi Arranafc19 ,
You can try these solutions
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
Regards,Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)Did I answer your question? Mark my post as a solution!
- AnonymousNot applicable
Hi Arranafc19 ,
You can use "datediff" function for calculation.
Here is the reference:
Best Regards,
KellyDid I answer your question? Mark my post as a solution!