Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Davideok
Contributor
Contributor

Aggr funtion to sort pivot data

Dear all,

I would ask your help to order data in a pivot table, I feel that Aggr() is the formula to be used but I'm not able to find a way that works.

In attachment the  pivot generated in excel and the qvf.

I have three markets, three groups and several models within each group.

 groups and models are common among the three markets 

How can I use Aggr() to sort by sum(amount) as per below excel screenshot? 

  • "markets" sorted by total sum amount
  • within a market "groups" sorted by total amount within the market
  • within a group "models" sorted by total amount within the market & group

thank you in advance

Davide

 

Capture.JPG

 

3 Replies
pradosh_thakur
Master II
Master II

Go to your pivot table change the sorting  order to Market-> Group-> Model , sort by sum(Amount) as expresion in asc/desc order

-Pradosh

Learning never stops.
Davideok
Contributor
Contributor
Author

Hi Pradosh,
I had to play with data and create a new database in order to show my issue.
Now ypsilon has the biggest sum in DB  but it's not the first under "Kenya - A"
thank you in advance
Davide

Davideok
Contributor
Contributor
Author

Hi all,

did I explain better my issue? anyone can help me with a advice?

thanks