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

Anyone up to this challenge?

i am using the following expression

=count(distinct(agenctlastname)/count(total distinct(agent last name)

This gives me the % productivity of active reps.

I am attempting to use this expression to figure out what the rep productivity was in a specific week. The problem it is uses the number total reps as of the current moment vs the number of sales reps previously.

For example:

week 1

week 2

week 3

in week 1 say I had 25 reps

in week 2 i had 27 reps

in week 3 I had 30 reps,

the expression is using 30 reps for all weeks. How do i write the expression so qliksense will only total the number of reps that were available in week 1 for example?

Thank you!

3 Replies
tresesco
MVP
MVP

Not sure if I understood right. You seem to in need of implicit element function p(). Try like:

Count(distinct {$<salesReps= P({1<Week={‘week 1’}>} salesReps)>} salesReps)

For better understanding see: SetAnalysis/set-modifiers-implicit-fi…

Anonymous
Not applicable
Author

THANK YOU

Sorry that gave 0 results.

what I am trying to say is in week one maybe i had 25 reps total, but only 20 wrote business,

in week 2 i now added to more reps so I have 27 available, and maybe 20 wrote business.

so as each week goes i may add more reps or maybe some resigned and left

each week may have a different number of available reps

what my expression is doing is assuming that all weeks have the current available reps, so if I have 40 reps by week 20 it then says i had 40 reps also in week one, this is therefore now giving me the wrong percentage as less reps were available to sell in week 1

Anonymous
Not applicable
Author

THANK YOU

Sorry that gave 0 results.

what I am trying to say is in week one maybe i had 25 reps total, but only 20 wrote business,

in week 2 i now added to more reps so I have 27 available, and maybe 20 wrote business.

so as each week goes i may add more reps or maybe some resigned and left

each week may have a different number of available reps

what my expression is doing is assuming that all weeks have the current available reps, so if I have 40 reps by week 20 it then says i had 40 reps also in week one, this is therefore now giving me the wrong percentage as less reps were available to sell in week 1