Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Mario_ES
Contributor III
Contributor III

Agregation Function not working

Hello,

I have a simple table of employees with multiple fields one of which the is the degree. Each level of degree has an spefic code assigned by the goverment based on hierarchy j: PHD 61, Masters Degree 59, University degree...

The problem is tha many of them have more than one degree and causes the rows to multiply one for each degree.

I want to only show the degree with the maximum code number. I have tried this formula and it's not working:

IF(AGGR([Degree Code]=MAX([Degree Code]),EmployeeNumber), "Degree's Name")

Can you please help.
2 Replies
Gysbert_Wassenaar

perhaps this works: firstsortedvalue([Degree's Name], -[Degree Code])


talk is cheap, supply exceeds demand
Mario_ES
Contributor III
Contributor III
Author

I have tried it out and it's not working.

This formula works, but returns the minimum value:

FirstSortedValue(Degree,aggr([Degree Code]=max([Degree Code]),EmployeeNum))

Can someone tell me how can I do to return the max instead, please!