cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Average Talktime in HH:MM:SS format

Hi,

 

I have a seconds column for the talktime, I would like to show average talktime for each catgory in the HH:MM:SS format.

 

Data in the tables 

Call_IDTeamTalktime_InSecondsTalktime_InHMS
1A50800:08:28
2A47500:07:55
3A30900:05:09
4B77900:12:59
5B27700:04:37

 

 

Would like below results 

TeamAverage Talktime
A0:07:11
B0:08:48

 

Thanks in advance 

 

Daven

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Average Talktime in HH:MM:SS format

Hi @Daven ,

 

Would you please refer to the measure below:

 

Measure =
VAR _Duration =
    AVERAGEX ( 'Table', 'Table'[Talktime_InSeconds] )
VAR Hours =
    INT ( _Duration / 3600 )
VAR Minutes =
    INT ( MOD ( _Duration - ( Hours * 3600 ), 3600 ) / 60 )
VAR Seconds =
    ROUNDUP ( MOD ( MOD ( _Duration - ( Hours * 3600 ), 3600 ), 60 ), 0 )
RETURN
    Hours * 10000 + Minutes * 100 + Seconds

 

 

Then change the data type to custom and 0:00:00 :

 

Capture.PNG

 

Capture1.PNG

 

For more details ,please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ERNkGZGrCQxIs3eBOT...

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Average Talktime in HH:MM:SS format

@Daven 

Please try this

Measure = FORMAT( CALCULATE(AVERAGE(Sheet13[Talktime_InHMS]),ALLEXCEPT(Sheet13,Sheet13[Team])),"HH:MM:SS")

1.PNG

Did I answer your question? Mark my post as a solution.Appreciate your Kudos!
Proud a to be a Datanaut!
Thanks and BR
Ryan
Highlighted
Super User IX
Super User IX

Re: Average Talktime in HH:MM:SS format

@Daven , Try like New column

 

time = time(0,0,[Talktime_InSeconds])

or

https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-usi...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Microsoft
Microsoft

Re: Average Talktime in HH:MM:SS format

Hi @Daven ,

 

Would you please refer to the measure below:

 

Measure =
VAR _Duration =
    AVERAGEX ( 'Table', 'Table'[Talktime_InSeconds] )
VAR Hours =
    INT ( _Duration / 3600 )
VAR Minutes =
    INT ( MOD ( _Duration - ( Hours * 3600 ), 3600 ) / 60 )
VAR Seconds =
    ROUNDUP ( MOD ( MOD ( _Duration - ( Hours * 3600 ), 3600 ), 60 ), 0 )
RETURN
    Hours * 10000 + Minutes * 100 + Seconds

 

 

Then change the data type to custom and 0:00:00 :

 

Capture.PNG

 

Capture1.PNG

 

For more details ,please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ERNkGZGrCQxIs3eBOT...

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

Highlighted
Helper I
Helper I

Re: Average Talktime in HH:MM:SS format

Thanks Dedmon

It works perfectly! 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors