Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Nora104
Creator
Creator

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:

1.png

But I use the formula:=aggr(rank(sum(indexB)),Code)

But the result is the below, the values are sorted from largest to smallest:

2.png

How can I write the formula to sort from small to large?

 

1 Solution

Accepted Solutions
MayilVahanan

HI @Nora104 

Try like below

=aggr(rank(-sum(indexB)),Code)

Thanks & Regards,
Mayil Vahanan R

View solution in original post

1 Reply
MayilVahanan

HI @Nora104 

Try like below

=aggr(rank(-sum(indexB)),Code)

Thanks & Regards,
Mayil Vahanan R

View solution in original post