Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

Re: How to get second employee selected in table?

Hi Gaurav,

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

Regards,

Peter

Highlighted
Specialist II
Specialist II

Re: How to get second employee selected in table?

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

Highlighted
Not applicable

Re: How to get second employee selected in table?

I have attached supported documents

Highlighted
Partner
Partner

Re: How to get second employee selected in table?

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.