Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Kawaljeet_Singh
Contributor
Contributor

Multiple grouping of data

Hi All, 

I'm performing analysis using three fields:-

Country/ProductName/SalesAmount

Here I'm trying to group data in a form that I could get the highest sold product name with it's sales amount for each country.

For help, I'm attaching small data set in qvd form.

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Hi @Kawaljeet_Singh ,

Please use below expression

=aggr(if(rank(sum(salesamount_))=1,productname_),country_,productname_)

to get desire output

abhijitnalekar_0-1653977305721.png

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

1 Reply
abhijitnalekar
Specialist II
Specialist II

Hi @Kawaljeet_Singh ,

Please use below expression

=aggr(if(rank(sum(salesamount_))=1,productname_),country_,productname_)

to get desire output

abhijitnalekar_0-1653977305721.png

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!