Forum Discussion
call center duration
- 5 years ago
llyons - I have some articles on this that I think you will find helpful:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
- 5 years ago
Hi, llyons
Based on your desciprion, I created data to reproduce your scenario.The pbix file is attached in the end.
Table:
You may create a custom column as below in 'Query Editor'.
= Table.AddColumn(#"Changed Type", "Custom", each let dur=[End]-[Start] in #time(Duration.Hours(dur),Duration.Minutes(dur),Duration.Seconds(dur)))In Power BI Desktop, you may create a calculated column as below to calculate total seconds.
TotalSeconds = HOUR([Custom])*3600+MINUTE([Custom])*60+SECOND([Custom])Finally you may format the column as below.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
llyons - I have some articles on this that I think you will find helpful:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
- llyons5 years agoFrequent Visitor
I am a new user and have the July 2020 version of Power BI. I do not have VAR Duration.
What I was able to do is create a column with the total amount of seconds (from my original example for one row 12:00:01 AM) but now I need to convert the seconds into time formate. I found dax Time (= TIME([intHours],[intMinutes],[intSeconds]) ) but as a new user I do not understand how to write the code to make it work. How would I get the formula = TIME([intHours],[intMinutes],[intSeconds]) to refer to my column that has the total amount of seconds for a call that I need converted to time format? Thank you for all of your time to help me understand the time function. I wish there was a simple way to do time like in Excel.