Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

qlikeers
New Contributor

Sorting Pivot Table by Year

Hi!

I have a problem with sorting in pivot table (Qlik Sense). In the attachment I show what I mean.

I would like the expression to be sorted in descending order for each year. Is it possible?

4 Replies
Employee
Employee

Re: Sorting Pivot Table by Year

Dear Kuba,

You can sort by expression like this sample.

Changing the sorting of a visualization using expressions - Qlik Sense - YouTube

Regards,

Ricardo Gerhard

qlikeers
New Contributor

Re: Sorting Pivot Table by Year

Thanks for Your answer.

But, unfortunately, in my case it didn't work.

For e.x.:

=if(Rank(sum([Sales]))=1,1,

    if(Rank(sum([Sales]))=2,2,3))

It works for first year in pivot table. Subsequent years are sorted according to the order of the first year (regardless of value).

rajeshqvd
Contributor

Re: Sorting Pivot Table by Year

Sort by Year descending order

qlikeers
New Contributor

Re: Sorting Pivot Table by Year

I tried probably all available default sorting options (and few expressions). I could not sort every year (1 dim) in a pivot table separately.


You can try to do this exercise in Qlik Sense (Years and Product in dimmensions, sum (sales) in measures).

Community Browser