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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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
Partner - Champion III
Partner - Champion III

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!