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
njxfoster
Helper I
Helper I

How to custom date/time column to fit working schedule so I can do calculation correctly

Hi Guys

 

How can I design a column which transform every time that's after 7pm to Next days 10am? Maybe with a TRANSFORMIF?

 

I need to create a column about lead reaction time. Which is (Attempt Time - Lead Created Time). However, some Lead Created Time is created after work time, So it can't be use for this calculation. (For example, If a lead is created at 01/01/2021 10:00pm, if a agent response to it at 01/02/2021 10:20am, the response duration will be 12 hours 20 mins. Which is not right. 

 

In order to get the right result I have to set every time thats passed 7pm to 10 am the day after

 

 

Your help will be very appraciated!

 

 

Thanks in advance

 

2 REPLIES 2
Anonymous
Not applicable

Hi @njxfoster ,

 

Can you provide dummy data and expected results?

For now, I suggest that you use the IF function to determine the date/time and make different calculations.

Do you have a column for creation time in your data?

 

 

Best Regards,

Stephen Tao

 

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

KNP
Super User
Super User

You could create a column that produced a 1 if inside business hours and a 2 if it is outside of business hours and then increment a date, today at 10am, by the new column. 

Paste in some data if you would like some examples built for you.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

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!

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 Kudoed Authors