Forum Discussion
How to subtract time
Hi,
I'm fairly new to Power Bi and would appreciate assisstance on the following:
I am trying to work out the difference between planned and actual time.
As you can see in image below :
- SECOND ROW = 40 minutes
- FIRST ROW = -15 minutes
My issue is with the first row. Due to it being a negative, it comes up as 'error'.
I don't need it to show the negative symbol but difference in HH:MM format
The table above is one a I created on Power Bi desktop
Is there a way I can work around this?
Note: I do have excel sheet that shows exactly what I need however when I upload, all formulas mess up. Can I keep my formulas?
Thanks Heaps!
Anonymous ,Refer if this can help
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
hi Anonymous
For your case, I would suggst you add a calculate column by dax as below
Difference=FORMAT([Arrived]-[Planned],"HH:MM")https://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function
Regards,
Lin
2 Replies
- amitchandakSuper User
Anonymous ,Refer if this can help
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
- v-lili6-msftCommunity Support
hi Anonymous
For your case, I would suggst you add a calculate column by dax as below
Difference=FORMAT([Arrived]-[Planned],"HH:MM")https://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function
Regards,
Lin