Forum Discussion
How to calculate Average Queue Time
How to calculate Average Queue Time
Hi Anonymous
Please refer to attached sample file with the solutionAverage Queue Time = VAR TotalTime = [Queue Time] VAR TotalSeconds = SECOND ( TotalTime ) + MINUTE ( TotalTime ) * 60 + HOUR ( TotalTime ) * 3600 VAR AverageSeconds = DIVIDE ( TotalSeconds, SUM ( 'Table'[Calls Queued] ), 0 ) VAR Hours = FORMAT ( QUOTIENT ( AverageSeconds, 3600 ), "00" ) VAR BalanceSeconds = MOD ( AverageSeconds, 3600 ) VAR Minutes = FORMAT ( QUOTIENT ( BalanceSeconds, 60 ), "00" ) VAR Seconds = FORMAT ( MOD ( BalanceSeconds, 60 ), "00" ) VAR Result = Hours & ":" & Minutes & ":" & Seconds RETURN Result
18 Replies
- tamerj1Community Champion
Hi Anonymous
Please refer to attached sample file with the solutionAverage Queue Time = VAR TotalTime = [Queue Time] VAR TotalSeconds = SECOND ( TotalTime ) + MINUTE ( TotalTime ) * 60 + HOUR ( TotalTime ) * 3600 VAR AverageSeconds = DIVIDE ( TotalSeconds, SUM ( 'Table'[Calls Queued] ), 0 ) VAR Hours = FORMAT ( QUOTIENT ( AverageSeconds, 3600 ), "00" ) VAR BalanceSeconds = MOD ( AverageSeconds, 3600 ) VAR Minutes = FORMAT ( QUOTIENT ( BalanceSeconds, 60 ), "00" ) VAR Seconds = FORMAT ( MOD ( BalanceSeconds, 60 ), "00" ) VAR Result = Hours & ":" & Minutes & ":" & Seconds RETURN Result- AnonymousNot applicable
Hi ,
I was shared sample data with you, DAX was working fine , but when i am adding 2 months data it is showing wrong, Queue time is showing wrong , it will go >24 hours , for < 24 hr it is working fine.
for > 24 hour queue time what is the solution for that..
- tamerj1Community Champion
Hi Anonymous
If you add the month column to the visual it should work fine.
- AnonymousNot applicable
amitchandak, can you help me out for same
- komaldHelper I
Anonymous , Try this
create measure,
avg queue time=divide(sum(total queue time) , sum(calls queued))
put this measure in card
or
create calculated column
avg queue time= total queue time / queued calls- AnonymousNot applicable
Hi,
Total queue time is in text format so unable to divide with call queued ..
- komaldHelper I
Anonymous , then use value function
avg queue time= value( total queue time )/ value(queued calls)
try this let me know is this work for u or not.