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
JordanJackson
Advocate II
Advocate II

Custom Column - Either same date as in another column or +1 day based off of criteria

Hi, 

 

I am looking for the formula for creating a custom column in power queary editor. 

 

I have a date column and then multiple time columns denoting the start, middle and end times of events. 

 

These events often pass over night so using DATEDIFF to calculate the duration isn't possible. 

 

My reasoning is that I need to create a custom column based off of whether the end date has passed over 12PM in the next day.

 

I am thinking that this can be done through having a custom column which look at the end time, if it is before 23:59:59 then is uses the date from the date column. If the time is 00.00.01 and higher then having it be the date in the date column +1 day. 

I also think I would have to do all time from say 00.01-07.00 as next day, and then 07.01 and 23.59

59 as being the same date. 

 

If anyone could help with what to write as the formula for this then that would be amazing!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JordanJackson ,

 

How about this custom column?

vstephenmsft_1-1666255779498.png

 

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.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @JordanJackson ,

 

How about this custom column?

vstephenmsft_1-1666255779498.png

 

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.

This worked perfectly, thankyou!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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