Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts
How would you calculate the difference in meeting start time and meeting end time in Power Query.
Sample Data
Start Time | End Time | |
11:30:00 | 13:00:00 | |
16:30:00 | 15:00:00 | |
09:15:00 | 10:30:00 |
Solved! Go to Solution.
@Invesco
Add a new column like this:
let
Difference = [End Time] - [Start Time],
Day = Number.Abs(Duration.Days(Difference)),
Hour = Number.Abs(Duration.Hours(Difference)),
Minute = Number.Abs(Duration.Minutes(Difference)),
Second = Number.Abs(Duration.Seconds(Difference)),
FullDurationAbs = #duration(Day, Hour, Minute, Second),
NextDayDuration = #duration(0,24,0,0) - FullDurationAbs
in
if [Start Time] > [End Time] then NextDayDuration else Difference
Hi - thats what i did but i get negitive time...
@Invesco
Because Start Time is bigger than End Time, do you want me to recreate and check if the Start Time is bigger, it takes the time to another day? so it would 22,5 hours?
yes please
@Invesco
Add a new column like this:
let
Difference = [End Time] - [Start Time],
Day = Number.Abs(Duration.Days(Difference)),
Hour = Number.Abs(Duration.Hours(Difference)),
Minute = Number.Abs(Duration.Minutes(Difference)),
Second = Number.Abs(Duration.Seconds(Difference)),
FullDurationAbs = #duration(Day, Hour, Minute, Second),
NextDayDuration = #duration(0,24,0,0) - FullDurationAbs
in
if [Start Time] > [End Time] then NextDayDuration else Difference
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |