cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

POWER BI COMM.PNG

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!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User IX
Super User IX

Re: How to subtract time

@Nella ,Refer if this can help

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Community Support
Community Support

Re: How to subtract time

hi @Nella 

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

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User IX
Super User IX

Re: How to subtract time

@Nella ,Refer if this can help

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Community Support
Community Support

Re: How to subtract time

hi @Nella 

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

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors