Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Rene86
Frequent Visitor

calculation of remaining time of an order

Hi,

 

I´ve several orders in a machine and need to calculate the remaining time for each.

 

The lead time for each is 30 minutes and needs to be calculated to the time right now.

 

In Excel it works with a simple Datediff " 30- (Datediff('EBM1Orders'[TimeStamp];Now();Minute)), but I´m unable do do that in the Power Query editor in PowerBi.

 

Thank you for your support in advance.

René

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Add the formula below to your EBM1Orders table.

 

30-Duration.TotalMinutes([TimeStamp]-DateTime.LocalNow())

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Add the formula below to your EBM1Orders table.

 

30-Duration.TotalMinutes([TimeStamp]-DateTime.LocalNow())

 

That was easy.. I was just to stupid 😉

 

Thank you for your quick help!

Anonymous
Not applicable

By the fact that you know any way to come up with the answer disqualifes you as stupid.

 

Power query is a bit different. I would say "progressing through your learning curve". 

 

And you are welcome!

Using that on my local PC, it´s working. After publishing, it´s not updating the "LocalNow"...

Any ideas on that?

Anonymous
Not applicable

I primarily use PQ in Excel and do not use the publish option. However, the link below might offer some ideas.

 

https://www.excelguru.ca/blog/2016/06/08/display-last-refreshed-date-in-power-bi/ 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors