Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Tofu2016
Contributor
Contributor

Rank Selection

Hi everyone. I am new to Qlik and need little assistance here. 

I have few Variables which gives me top 10 and bottom 10 rep for metrics like Qty, Calls Amount Spend. So Variable gives me top 10 and bottom 10 reps for above mentioned metrics. Plus I have assigned a score of 3 for such reps. 

The following expression gives top 10 and bottom 10 of calls:

count({<RepName={'=Rank(Count( distinct [Call_ID]))<=11'}> +
<RepName={'=Rank(-Count( distinct [Call_ID]))<=10 or Count([Call_ID])=0'}>} distinct Veeva_Call_ID)

In the same way, I have set the variable for qty and amount spend.

The following expression gives me score for top 10: If(Rank(Count(Distinct [Call_ID])) <= 10,3,0)

The following expression gives me score for bottom10: If(Rank(-Count(Distinct [Call_ID])) <= 10,3,0)

Same way I have assigned score for top 10 and bottom 10 qty and amount spend

Now, how the score works. Let say a rep falls in Call top 10 slot and Qty bottom 10 slot. So that rep score will be 6 and so on. So far it works fine.

Issue arise when I select a rep from rep filter. If I select a single rep from rep filter than the total score shows 18. It is taking the risk score from all the variables and giving me a total. 

Which I do not want. I want the score of the rep to remain same. 

I used : If(Rank(Count({<RepName=>}Distinct [Call_ID])) <= 10,3,0) but it is not giving me a correct answer. Any help would be appreciated.

Thanks

Labels (7)
1 Reply
Chanty4u
MVP
MVP

Try something like below for all

If(Rank(Count({<RepName={$(=RepName)}>} Distinct [Call_ID])) <= 10, 3, 0)