Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Ranking in Listbox based on selection from Another Listbox

HI All,

I am trying to get the below working. I have an employee table with Income  and Productcount

In the Selection table, I just have the column names Income and Productcount as values for the field TYPE.

I have the employee names listed and sorted using an expression which uses rank function.

What I am trying to achieve is,

Based on the selection  in the TYPE list box, the Dynamic list box should rank the employees.

Attached is the sample qvw. Any help is much appreciated.

Thanks

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Under sorting tab expression, use below

=IF(GetFieldSelections(TYPE)='Income',Aggr(SUM(Income),emp),Aggr(SUM(Productcount),emp))

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Under sorting tab expression, use below

=IF(GetFieldSelections(TYPE)='Income',Aggr(SUM(Income),emp),Aggr(SUM(Productcount),emp))

Not applicable
Author

Thank you. It worked. How will I make it to work if I choose both Productcount and Income (combined ranking)

MK_QSL
MVP
MVP

If you want combine ranking, let me know which criteria you would like to use..

Not applicable
Author

I did slightly change the empression to use rank instead of sum like below,

  IF(GetFieldSelections(TYPE)='Income',Aggr(rank(Income,4),emp),Aggr(rank(Productcount,4),emp))

The criteria is to again sort the employees usinng combined ranking. Does that make sense?

Not applicable
Author

Hi Manish,

I had to put a hold on this logic so getting back into the issue again. How should we do combined Ranking like in the Golf Game. But the trick is the Employee List box or the chart with the Employee and individual Ranks should be ranked for the selected values in the TYPE list box. I am thinking of or statement in the sort expression. But not sure.

Your help is much appreciated. Attaching the modified version of the qvw.

Thanks,