Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

JAN. 24, Q&A with Qlik: Making the Move to Qlik Cloud Reporting: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

FirstSortedValue Giving.. Nested Aggregation

Hi All, I have the below requirement, to show the image for each style that has max sales.

in this case, i need to show image5 for Style =30 and image2 for Style=50.

I have written my code like this : FirstSortedValue(URL,-Aggr(Sum(Sales),Style,Item)), when i use this iam getting nested aggregation error as i am using this function in another function which has sum,max.

Now, Could you please help me to acheive the same requirement in Qlik Script (FirstSortedValue(URL,-Aggr(Sum(Sales),Style,Item))


OR at the UI level, can we write the logic in different way similar to the FirstSorted logic.

Kindly, please help , i am in terrible situation.


Item URL Style Sales
10012 Image1 NY30 1000
10013 Image2 NY30 550
10014 Image3 NY30 4000
10015 Image4 NY30 3000
10016 Image5 NY30 10000
10017 Image6 NY30 450
10018 Image7 NY30 360
10019 Image8 NY30 4000
20019 Image1 NY50 4000
20019 Image2 NY50 95000
20019 Image3 NY50 1323
20019 Image4 NY50 11200
20019 Image5 NY50 7689
Labels (1)
0 Replies