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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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))