Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am looking for a soloution for calculating the time between two time columns when the time between the two has passed over 24 hours.
I have the start time, a middle time and the end time for events occuring overnight, and so the end time will mostly be the early hours of the following day (right most column in attachment).
Attached is an example of my data.
How can I calculate the amount of time between these columns?
Do I need a calculated column in order to state if it is the following day to allow for this?
Thanks in advance
hi,
you have more options.
best would be to collect not only time but also date and calculate duration.
second option is to be sure that that the difference cant be bigger than 24 hours. if this is true than you can do two calculations based on following condition.
if startTime(20:00) is bigger then endtime (10:00) then
duration = diff(startTime, 23:59:59) + Diff(0:00,endTime)
else
duration = Diff(startTime,endTime)
function syntax may vary based on usage.
Thank you for your reply,
I am thinking that I will create a calculated column for whether the date is the same or +1 day. Then i should be able to use DATEDIFF in order to calculate the difference in time between the two.
I think I may be able to suggest changes to data collection going forward, but unless I do it manually I need a quick way to get dates for every entry.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.