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: 
Not applicable

How to get second employee selected in table?

Hi All,

I have employee table having employee information.I want to select two employee at a time in straight table.

if i select two records and if i want salary of second selected employee how can i get that in Qlikview?

Regards,

Gaurav

Message was edited by: Gaurav Wani I have added supporting files. I want to select empid 1 and 4 and i want to view or compare their salary side by side then how can i achieve this?

4 Replies
peschu123
Partner - Creator III
Partner - Creator III

Hi Gaurav,

could you post some sample data or describe your table a bit more? (dimensions, expressions...)

Regards,

Peter

flipside
Partner - Specialist II
Partner - Specialist II

Hi Gaurav,

You would have to use Set Analysis. For example if your data is this ...

 

Data:

Load * inline [
EmpId, Salary
1, 3000
2, 4000
4, 5000]
;

.. then you can get the min and max salaries selected using these ...

 

=Only({<EmpId={$(#=Min(EmpId))}>} Salary)

=Only({<EmpId={$(#=Max(EmpId))}>} Salary)

flipside

Not applicable
Author

I have attached supported documents

christian77
Partner - Specialist
Partner - Specialist

If it is inside the same table and you have it in column 1 ordered by salary descending, then you go like:

TOP (total COLUMN(1),2) .

Outside the table with a macro. You can get any value, any cell from any table with a macro.

Try to use function rank.

Salutes.