# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

## Sort a rank

Hi everyone,

I have a pivot table with one dimension = rank (1 to 10).

This rank =IF(Aggr(Rank(sum({\$<Week={\$(=Max(Week))}>}Amount)),Var,CName) <= 10,Aggr(Rank(sum({\$<Week={\$(=Max(Week))}>}Amount)),Var,CName),Null())

The order of dimensions is Var (No sort), CName sort by expression = sum({\$<Week={\$(=Max(Week))}>}Amount) , Rank (No sort).

However, ranking sort is not working.

any help????

Thanks

Tags (3)
1 Solution

Accepted Solutions
Highlighted
Esteemed Contributor III

## Re: Sort a rank

I am not sure there is something happening with your Customer Field? Check attached.

11 Replies
Highlighted
Valued Contributor III

## Re: Sort a rank

did you try to sort by expression:

Aggr(Rank(sum({\$<Week={\$(=Max(Week))}>}Amount)),Var,CName)

Highlighted
Not applicable

## Re: Sort a rank

It's no working

Highlighted
Esteemed Contributor III

## Re: Sort a rank

can you share your sample to look into?

Highlighted
Not applicable

## Re: Sort a rank

attached my sample model, where you can see that rank is not ordered

Thanks

Highlighted
Not applicable

## Re: Sort a rank

attached my sample model, where you can see that rank is not ordered

thanks !

Highlighted
Valued Contributor III

## Re: Sort a rank

I think you have to promote the rank to the top of the sorting levels. Means rank must be the first dimension.

This is the way how pivots work. Everything is grouped and within one group (dimension) the next sorting will be applied.

Highlighted
Not applicable

## Re: Sort a rank

Nop. This not working... these happen when I promoted the rank to the top:

Help!!!

Highlighted
Valued Contributor III

## Re: Sort a rank

Did you set the sort order of "RNK" to numeric ascending?

Is RNK now on the top level of your sort order?

Highlighted
Not applicable

## Re: Sort a rank

In the print screen above rank is the first dimension and I loose the ranking by Variable...