Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
See below how can I add a new column to show the different between start date and end date in table below. Duration needs to be in hours, minutes and seconds.
Thanks
Ian
Solved! Go to Solution.
You will need a measure or a calculated column.
You can use DATEDIF() to get the difference in minutes, like this
DATEDIFF ( 'prod agenttask'[TaskStartTime].[Date], 'prod agenttask'[TaskEndTime].[Date], SECOND)
and once you have the number of seconds you can do simple math to figure out how many hours/minutes/seconds that is using the MOD() function. First figure out how many hours you have and then operate on the remainder to figure out your minutes, and then again on the remainder to figure out your seconds.
Help when you know. Ask when you don't!
Hi @Pick ,
Do you mean to get the time data like "hh:mm:ss"?
Refer
You will need a measure or a calculated column.
You can use DATEDIF() to get the difference in minutes, like this
DATEDIFF ( 'prod agenttask'[TaskStartTime].[Date], 'prod agenttask'[TaskEndTime].[Date], SECOND)
and once you have the number of seconds you can do simple math to figure out how many hours/minutes/seconds that is using the MOD() function. First figure out how many hours you have and then operate on the remainder to figure out your minutes, and then again on the remainder to figure out your seconds.
Help when you know. Ask when you don't!
Refer to these posts.
https://community.powerbi.com/t5/Desktop/Calculating-day-time-difference/m-p/321189
If it helps, mark it as a solution
Kudos are nice too
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
77 | |
63 | |
51 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
60 | |
57 |