Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kkkumar82
Specialist III
Specialist III

Can we find the selected value in top 3 or not

Hi all,

I have created a sample data where there are five employees along with their salaries, I have a small requirement whether we can find a selected employee is in top three based on salaries or not, for that I have a text box which should show "<name> is in top three " or

"<name> not in top three".

And also "is it possible to display the rank of the selected employee by salary in text box".

Thanks

Kiran Kumar

1 Solution

Accepted Solutions
Kushal_Chawda

Please find the attached.

Is it what you are looking for?

View solution in original post

5 Replies
antoniotiman
Master III
Master III

Hi Kiran,

see attachment

kkkumar82
Specialist III
Specialist III
Author

Hi Antonio,

Thanks for your immediate response but there is another text in which I want whether a selected employee comes under top three based on salary or not. The id is TX02

Thanks

Kiran Kumar

Kushal_Chawda

Please find the attached.

Is it what you are looking for?

kkkumar82
Specialist III
Specialist III
Author

Thanks Kush,

There is one more way I achieved it , check if there is any mistake.

=if(getfieldselections(Emp)>0,if(aggr(Rank(Sum({1}[Salary])),Emp)<=3,Emp &' is in top three ',Emp &' is not in top three'),'Select an Employee')

Thanks

Kiran Kumar

Kushal_Chawda

Yes, you are correct. But then your Top 3 exclude all other selections and your Top 3 will not be dynamic.