Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW TO DISPLAY 2ND HIGHEST SALARY IN QLIKVIEW?

HI,

I WROTE EXPRESSION LIKE THIS RANK(SUM(SALARY),2) IN EXPRESSION TAB . BUT IT DISPLAYED 2ND

IT DISPLAY SECOND HIGHEST ID  BUT I WANT TO DISPLAY 2ND HIGHEST SALARY.PLS SOLVE THIS PROBLEM .HOW TO DISPLAY SECOND HIGHEST SALARY .

REGARDS

MADHU

Capture top2 salary.PNG

9 Replies
rakesh_kumar
Creator
Creator

Sum(Max(Salary,2))

Not applicable
Author

HI RAKESH KUMAR,I WROTE EXPRESSION LIKE THIS SUM(MAX(SALARY,2))BUT IT DISPLAY MAX SALARY ID NUIMBER IT DOES NOT DISPALY 2ND HIGHEST SALARY.I WANT TO DISPLAY 2ND HIGHEST SALARY PLS

TELL ME OUT HOW TO DISPLAY 2ND SALARY IN QLIKVIEW.

rakesh_kumar
Creator
Creator

Hi Madhu,

Sorry I didn't understood your question?

If you just want the second highest salary , you can create a text box with this expression: Max(Salary,2)

I dont understand what you are trying to show inside the Straight table? Can you post a example output on what you are expecting, ex. fill an excel table , take a screenshot and post it so I can understand?

antoniotiman
Master III
Master III

Hi Madhu,

like this

2ndSalary.png

Regards,

Antonio

ramoncova06
Specialist III
Specialist III

=Aggr(If(Sum(SALARY)>=Max(TOTAL Aggr(Sum(SALARY), Name), 4), Name), Name)

Also, if you don't need the total this expression can work avoiding calculated dimension:

If(Sum(Sales)>=Max(TOTAL Aggr(Sum(Name), Name), 4), Sum(Name))

from Customers Having Top 4 Values

Not applicable
Author

HELLO RAKESH KUMAR.I WANT TO DISPALY 2ND HIGHEST SALARY IN STRAIGHT TABLE.LIKE THIS

THIS IS MY STRAIGHT TABLE DATA.

ID NAME SALARY

1 MADHU 15000

2 KALYAN  20000

3 MANJU 23000

4 RAM  8000

5  SREEKAR 13000

I WROTE EXPRESSION IN EXPRESSION TAB LIKE THIS RANK(MAX(SALARY),2).BUT I DISPLAY  ABOVE TABLE ID LIKE THIS  1 BUT I WANT TO DISPLAY 2ND HIGHEST SALARY LIKE THIS  20000.PLS TELL ME OUT HOW TO DISPLAY LIKE THIS

ID  NAME SALARY

2   KALYAN  20000

antoniotiman
Master III
Master III

Your need ?

2ndSalary.png

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_166816_Pic1.JPG

QlikCommunity_Thread_166816_Pic2.JPG

hope this helps

regards

Marco

Not applicable
Author

You need to write Calculated dimension  as

if(aggr(rank(sum(SALARY)),ID)=2,ID)

& Expression as Sum(SALARY)

Also Suppress the Null values of this Calculated Dimension. Hope This Helps

Second highest Salary.jpg

Regards

Abhishek