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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gkcchowdary
Creator
Creator

How to find second highest salary

Hi how find second  highest salary in qlikview

7 Replies
avinashelite

Try like this

max(salary,2) // gives as per selection

or

Max({1}salary,2)

Anonymous
Not applicable

In your expression, try:

sum({<Salary={'=rank(sum(Salary))=2'}>}Salary)

Anonymous
Not applicable

See attached

Not applicable

Use the below script in Calculated dimension and use Sum(Salary) in Expression

If(Aggr(Rank(Sum(Salary),Employee)=1,Employee)

Or you can use dimension limits Tab, do the below thing

sal.JPG

trdandamudi
Master II
Master II

Look into FirstSortedValue() function....

muthukumar77
Partner - Creator III
Partner - Creator III

Use into expression,

If(rank(sum(Salary))=2,sum(Salary),0)

Muthukumar Pandiyan
Not applicable

You can try:

=FirstSortedValue(Sal, aggr(rank(sum(Sal)),Name), 2)