Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Uniques based on highest value on another column

Hello, so I have a dataset as a .csv file that has two columns, one for "professorID" , "Degree" and i'd like to get the uniques from professorID based on the highest value that he has on "Degree". I have uploaded an image with the example, in this case Doctor is a higher degree than Master for example. Any suggestions?0683p000009M83c.png

Labels (4)
1 Solution

Accepted Solutions
akumar2301
Specialist II
Specialist II

You need to have one mapping table to define Degree order e.g
Doctor:1
Master:2
Bechelore:3

Then join your data and these mapping. Then you taggregaterow to get the highest degree for each professional.

View solution in original post

2 Replies
akumar2301
Specialist II
Specialist II

You need to have one mapping table to define Degree order e.g
Doctor:1
Master:2
Bechelore:3

Then join your data and these mapping. Then you taggregaterow to get the highest degree for each professional.
Anonymous
Not applicable
Author

Based on MySql tag, you can use row_number window function and use FIELD() to give priority to various degrees and select 1st row. Refer below links. Hope this helps

http://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/

http://www.mysqltutorial.org/mysql-order-by/