Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
xarapre7
Creator II
Creator II

Answered Calls >0 in the expression

Hi All!

The expression below includes CALLS_ANSWERED that are greater than 0.  How can I include in this expression to exclude the number of agents who have 0 CALLS_ANSWERED for a specific time frame?  I only want the count of agents with CALLS_ANSWERED >0 for its denominator.

=Num(Sum({1} Aggr((Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}total<FULL_DATECALLS_ANSWERED)/
Count({$<WM_TEAM = p(TEAM),EMPLOYEE_NAME=>} Total<FULL_DATE>EMPLOYEE_NAME)),FULL_DATE)),'#,##0')

Thank you in advance!

23 Replies
sunny_talwar

May be try this:

=Num(Sum({1} Aggr(


(Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}total<FULL_DATE>  CALLS_ANSWERED)/


If(Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}total<FULL_DATE>  CALLS_ANSWERED) > 0,

Count({$<WM_TEAM = p(TEAM),EMPLOYEE_NAME=>} total<FULL_DATE> EMPLOYEE_NAME)))

, FULL_DATE)),'#,##0')

Like I explained previously, you probably don't need a total here since you are using this in a text box object

xarapre7
Creator II
Creator II
Author

Hi Sunny!

Thank you again for your immediate reply.

I tried above expression you've given.  It worked but the denominator is only giving 1/4 of the total number of employees who have received calls. Upon selecting a specific individual, the Team's Avg result it's giving was 194 but the expected is 822.  I tried It with and without the total and it's giving me the same result of 194.

sunny_talwar

How about this?

=Num(Sum({1} Aggr(

(Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}CALLS_ANSWERED)/

Count(DISTINCT {$<WM_TEAM = p(TEAM),EMPLOYEE_NAME=, EMPLOYEE_NAME = {"=Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}CALLS_ANSWERED) > 0"}>} EMPLOYEE_NAME))

, FULL_DATE)),'#,##0')

xarapre7
Creator II
Creator II
Author

Unfortunately, it's still giving me the same result of 194.

sunny_talwar

Can you look at just this expression

Sum({1} Aggr(Count(DISTINCT {$<WM_TEAM = p(TEAM),EMPLOYEE_NAME=, EMPLOYEE_NAME = {"=Sum( {$<TEAM = p(TEAM),EMPLOYEE_NAME=>}CALLS_ANSWERED) > 0"}>} EMPLOYEE_NAME), FULL_DATE))

and see what you are getting?

xarapre7
Creator II
Creator II
Author

It's giving me a result of 1,014.  It's getting close to 822!  yay!

sunny_talwar

The above is just the denominator part of the equation.... do you see an employee count of 1014?

xarapre7
Creator II
Creator II
Author

Yes...it's just the denominator part.  Once, we get the 822, then we should be able to get to the expected Team's Avg.

xarapre7
Creator II
Creator II
Author

=Sum(Aggr(Count(DISTINCT {$<WM_TEAM = p(WM_TEAM),EMPLOYEE_NAME=, EMPLOYEE_NAME = {"=Sum( {$<WM_TEAM = p(WM_TEAM),EMPLOYEE_NAME=>}CALLS.CALLS_ANSWERED) > 0"}>} EMPLOYEE_NAME), DAY_MASTER.FULL_DATE))

is giving me 971.  Getting closer and closer.  🙂