Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Solved! Go to Solution.
Hi @JordanJackson ,
How about this custom column?
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.
Hi @JordanJackson ,
How about this custom column?
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!!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |