
Partner - Creator
2020-12-15
01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use rank function to sort values from small to large in pivot table
I want to add a rank column to the front so that it will start from small to large by index B:
But I use the formula:=aggr(rank(sum(indexB)),Code)
But the result is the below, the values are sorted from largest to smallest:
How can I write the formula to sort from small to large?
- Tags:
- new_to_qlikview
1,537 Views
1 Solution
Accepted Solutions

MVP
2020-12-15
01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @Nora104
Try like below
=aggr(rank(-sum(indexB)),Code)
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
1 Reply

MVP
2020-12-15
01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @Nora104
Try like below
=aggr(rank(-sum(indexB)),Code)
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
