Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
M_B_
New Member

Average Talk Time Issue

Hi

 

I'm trying to calculate average talk time, and am having issues where the call goes into a new day:

 

M_B__0-1635339527677.png

 

My measure is:

Duration Average =

VAR total_second =
AVERAGEX(
CallSummary,
DATEDIFF(CallSummary[wsp_ucc_AcceptedTime],CallSummary[wsp_ucc_EndTime],SECOND)
)

VAR DAXDay = INT(total_second/(24*60*60))
VAR DAXHours = MOD(INT(total_second/(60*60)),24)
VAR DAXMin = MOD(INT(total_second/60),60)
VAR DAXSec = ROUND(MOD(total_second,60),0)

RETURN DAXDay &":"& DAXHours &":"& DAXMin &":"& DAXSec

 

Can anybody see what is wrong with my formula?

 

Thanks!

4 REPLIES 4
Anonymous
Not applicable

Try RETURN DAXDay&":"&TIME(DAXHours, DAXMin, DAXSecond)

 

--Nate

Unfortunately, that still returns strange results:

M_B__0-1636017636401.png

I can see the second part of the calculation has worked correctly. The top call is indeed 17 minutes long, but the first half of the calculation is still adding almost a month to the call time...

As you can see from the next result down on my screenshot, all my other calls are accurate. It's just when the date changes mid-call it can't work it out.

Anonymous
Not applicable

Hello @M_B_ 

 

Have you tried to substract call end time with call start time and represent the value as seconds?

 

 

Hi @Anonymous 

I thought that was essentially what my DATEDIFF was doing within this sum?

 

What formula would I need for a straight subtraction End Time-Accepted Time which would return a value in seconds?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.