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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Working with time and duration values

Looking for assistance.

Description of issue:

When deducting duration from Time, after an hour 00.00 and before 00.45, the value is not deducted correctly.

Walkthrough:


Working with columns:

"OpenHoursTo" as text value, eg. 

OpenHoursTo.JPG
"DeliveryTime" as whole number eg. 15, 45, 0

DeliveryTime.JPG

 

Purpouse -  find the timestamp: OpenHoursTo - DeliveryTime


Step_1: Transform text value of column "OpenHoursTo" to Time, we get eg: 16:00

 

Transformed_OpenHoursTo.JPG

Step_2: Transform whole number of column "DeliveryTime" to Duration

 

Transformed_DeliveryTime.JPG

So if DeliveryTime is 15, transformed value is - 0.00:15:00

Formula used: DeliveryTime = #duration(0,0,0, [DeliveryTime]*60) (NOT SURE IF THIS IS CORRECT)

Result:

 

Result.JPG

 

As can be seen highkighted values, except the last one, give an incorrect result. Once the clock hits between 00.00 & 00.45, the values are not deducted correctly.

Any ideas how can I fix this issue?

Thanks, 
Ed

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

You may create a custom column as below:

Custom=[OpenHoursTo]-#duration(0,0,[DeliveryTime],0)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
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
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

You may create a custom column as below:

Custom=[OpenHoursTo]-#duration(0,0,[DeliveryTime],0)

1.png

 

Regards,

Cherie

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

Worked great, thanks for your help!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Solution Authors