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.
Hi llyons ,
If I were you I'd take the following steps.
- Either keep only the right left 5 characters of your column, so you lose the '12:' or subtract by the twelve hours leaving you with '00:16:29'
- Transform the time to seconds, so you can have it as an integer value
- From here, you can easily make calculations to have it in either minutes or hours
- Use the Time Intelligene functions you've mentioned to get the desired result.
Cheers,
Maurice
what are the formulas to do the steps you prepose,excluding the charts
- MauriceMecowe5 years agoResolver II
In order to keep the right 5 characters of a column:
RIGHT(Column, 5)This will get you the time in seconds.
Column = MINUTE(Table[date time])*60+SECOND(Table[date time])Divide this by 60 in order to get minutes etc.