Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pratham39
Contributor III
Contributor III

Set analysis - Find Current Location of employee Based on Current Designation

Hi,

I have below table on frontend ,

the Green one is current location of employee based on max number of Designation No which is 13,

So basically in Current Location Column that value should come (Allahabad_W_EC)

Doubt2.png

Please help me to write set analysis for Current Location....

Thanks

 

#SetAnalysis

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Try this

Aggr(FirstSortedValue([Location Area], -[Designation No]), [Employee No])

View solution in original post

4 Replies
BrunPierre
Partner - Master
Partner - Master

As below with set analysis

Only({$<[Designation No]={"$(=Max([Designation No]))"}>} [Location Area])

pratham39
Contributor III
Contributor III
Author

Hi,

Thanks for reply,

Your solution is working perfectly fine for any single employee ,

but in overall table for all employees it is only showing Max DesignationNo Location 

The Red one in below table should show location Mumbai but as it is taking max ID - 13 as per your expression 

it won't show Mumbai 

doubt1.png

Please help

Thanks

BrunPierre
Partner - Master
Partner - Master

Try this

Aggr(FirstSortedValue([Location Area], -[Designation No]), [Employee No])

pratham39
Contributor III
Contributor III
Author

It worked!

Thanks