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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
HenryJS
Post Prodigy
Post Prodigy

Calculating Time from Start & End Times

Hi all,

 

How can I calculate the hours between two start / end times? The below formula does not calculate the hours correcly

 

Engage Hours per day = ([Start]-[End])

 

time3.PNG

2 ACCEPTED SOLUTIONS
v-eachen-msft
Community Support
Community Support

Hi @HenryJS ,

 

You could use Time.Hour() in query editor.

if [Start]>[End] then
24-Time.Hour([Start])+Time.Hour([End])
else Time.Hour([End])-Time.Hour([Start])

Here is the result.

 2-1.PNG

 

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

View solution in original post

v-eachen-msft
Community Support
Community Support

Hi @HenryJS ,

 

Does that make sense? If so kindly mark my answer as a solution to close the case. Thanks in advance.

 

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

View solution in original post

16 REPLIES 16

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.