Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tanjavarwijk1
Contributor
Contributor

Preference aggr

How do I get the result:

for each customer the preference city for each color by counting orders

I have tried

Only({$<Color = {"=rank(count( SalesNum),4)=1 "}>}Color)

and

aggr(MaxString(City),Color,CustomerNum)

Preference.jpg

Labels (3)
1 Reply
brunobertels
Master
Master

hi 

may be with firstsortedvalue function : 

 

firstsortedvalue( City, -aggr(MaxString(City),Color,CustomerNum))