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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have the table below. I have a Plannned Entry Time and a Planned Exist Time and a Planned Duration which are all Time fields. I have used the following formula for the Planned Duration Column
Solved! Go to Solution.
THis has solved it - thank you so much for your help
@spandy34 Is this being done in Power Query?
No not power query . I just added the column in the table imported from an sql database
@spandy34 OK, try this:
Planned Duration =
IF(
[PlannedExitTime] = TIME(0,0,0),
(TIME(23:59:59) - [PlannedEntryTime) + TIME(0,0,1),
[PlannedExitTime] - [PlannedEntryTime]
)
THis has solved it - thank you so much for your help
Are you taking into account the fact that anything after midnight is the following day?
Do your time fields include a date?
See also:
Solved: Concatenate date and time from different columns i... - Microsoft Power BI Community
no it doesn't include a date. I think that was the problem . I think I need some DAX thst says if the time equals midnight then it's handled differently than just [PlannedExitTime]-[PlannedEntryTime]
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 123 | |
| 99 | |
| 67 | |
| 49 |