Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank issue

Hi Team,

I am new to QlikView and currently stuck with Rank function.

I have a table with 2 fields, EmpID and Salary

Ex :

EmpID Sal

Rose 1000

Rahim 2000

Reshma 2000

Paul 3000

Richie 4500

Rossel 5000

Zen 5000

Pith 6500

Proj 7000

Annie 8500

I want to get the top 3 and bottom 3 salaries.

Kindly help me with the formula.

I have tried doing this, But query fails :

=(if(aggr(rank(sum(EmpID)),[SAL])>2,Sal))

=Max( aggr ( sum(EmpID)/Count([sAL]) ,SAL ))

Thanks in advance

10 Replies
Not applicable
Author

Hi Sunil,

Hope you doing good.

Test.JPG

As per the earlier query, we have implemented the Rank function for EmpID and their respective Salary.

There were 4 Employees which have the same salary and Ranked as 4-5 and 8-9.

Now if I Group the Ranks into A & B, so that I can differentiate their Ranks (i.e. the same salary gets divided into two groups)

Kindly assist me implementing the same, using Rank function (without using Sort function) i.e. Giving Ranks to same salary but for different Employees

EmpID, Salary, Rank, Group

Annie    8500    1,    A

Proj    7000    2,    A

Pith    6500    3,    A

Rossel    5000    4-5,  A

Zen    5000    4-5,  A

Richie    4500    6,    A

Paul    3000    7,    A

Rahim    2000    8-9,  A

Reshma    2000    8-9,  B

Rose    1000    10,   B

Your help would be appreciated. Thanks in advance