This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
is it possible to subtract the 2 columns below and get the answer in a time format.
The format that I am looking for would be
Solved! Go to Solution.
In the query editor, add your column where you subtract the two columns, which will result in a duration. Change the type to a decimal number (that will be in days). Load the data, then go to the Diagram View and use a custom format string to display it as a datetime with a format string of hh:nn:ss
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi, @Anonymous
According to your description and sample data, I can clearly understand your requirement, you can try this calculated column to output the duration time in the correct format:
Duration =
var _diff=[Date2]-[Date1]
return
HOUR(_diff)&":"&MINUTE(_diff)&":"&SECOND(_diff)
And you can get what you want, like this:
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In the query editor, add your column where you subtract the two columns, which will result in a duration. Change the type to a decimal number (that will be in days). Load the data, then go to the Diagram View and use a custom format string to display it as a datetime with a format string of hh:nn:ss
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 25 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 56 | |
| 48 | |
| 37 | |
| 21 | |
| 20 |