Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Counting only highest levels of education for different ID's

Hi,

I am creating dashboard showing education grades (in Qlik Sense)

I have a list of people with information about schools they finished, and degrees they graduated with.

Based on that, I want to create dashboard showing how many professors there is, how many MA's, BA's etc.

I have 3 variables:

- ID of each person - ID

- degree achieved - Degree_Name

- name of degree as number (the highest education degree, the highest number) - Degree_No

Each person can have 1-3 degrees from different universities.

I want to show on chart the number of people holding specific degree, but I want each person to be calculated only once (if person holds BA, MA, and PhD degree, I want her only in PhD bar. There can be also person holding 2 MA's from different faculties - he also should be counted as one).

So, from each distinct ID I want to take only one highest level of education.

I guess there will be use for distinct / max / count functions, but I don't know how to put it in right order.

I would be very thankful for any guides.

1 Solution

Accepted Solutions
sunny_talwar

Change the dimension to this

Aggr(FirstSortedValue(DISTINCT Degree_Name, -Degree_No), ID)

View solution in original post

4 Replies
sunny_talwar

May be try this

Dimension

Aggr(FirstSortedValue(Degree_Name, -Degree_No), ID)

Expression

Count(DISTINCT ID)

Anonymous
Not applicable
Author

Thanks a lot, it works fine for vast majority of records.

However, if someone has more than one the same level of education (eg. person helds 2 different MA degrees) isn't counted at all.

Is it possible to fix it?

sunny_talwar

Change the dimension to this

Aggr(FirstSortedValue(DISTINCT Degree_Name, -Degree_No), ID)

Anonymous
Not applicable
Author

Yes, with that correction it works perfectly.

Many thanks!