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
Highlighted
Super User IV
Super User IV

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!!
My Recent Blog -Week is not so Weak 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
Highlighted
Super User IV
Super User IV

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!!
My Recent Blog -Week is not so Weak 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 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors