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

About Rank Function?


Hi Folks,

I have a Table with Emp_ID,Sal,Deptno

I want to show only top 10 Salaries Deptno or Emp_ID

I tried Rank(sum(Sal),10) --It is not giving the proper result what i expect.

Can u plz suggest me this using Rank function only.

I tried aggr(rank(sum(Sal))<10,Deptno) --- both are not working properly.

Thanks,

rakesh

10 Replies
priyalshah9779
Contributor III
Contributor III

Hi

I have try to achieve this , Let me know if this helps

Thanks

Priyal

Not applicable
Author

Hi,

Can please post the logic Here

priyalshah9779
Contributor III
Contributor III

Hi

Dimension: DepartmentName,Employeeid

Expression :=IF(Rank(Total Sum(Salary))<4,Sum(Salary))

Thanks

Priyal

anbu1984
Master III
Master III

Dim: DeptNo

Expr: If( Rank(Aggr(Sum(Sal),DeptNo))<10,Sum(Sal))

jpapador
Partner - Specialist
Partner - Specialist

Like others have suggested:

Dimensions: Dept No and Emp No

Expression:

If(Rank(Sum(TOTAL Sal),4) <= 10, Sum(Sal))

MarcoWedel

you could also use dimension limits in your chart:

Chart properties/Dimension limits/show only largest 10 values

hope this helps

regards

Marco

Not applicable
Author

Hi,

Thanks for ur reply.

but it's not giving proper result

Not applicable
Author

Hi,

but it is giving the other departments also

Not applicable
Author

only using with rank() i want