Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

spividori
Valued Contributor

Order pivot table by expression

Hi.

I have a pivoting table with 2 dimensions: Codigo and Imputación, I put it in the 2 dimensions that it orders by expression: sum (Quantity), but it orders it only by the first dimension, it does not work when I display the second dimension by Imputation.

Attached example.

Pegar.PNG

Pegar1.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Order pivot table by expression

Try with a calculated 2nd dimension

=Dual(Imputacion, Aggr(Sum(Cantidad), Codigo, Imputacion))

and sort it using this expression

Aggr(Sum(Cantidad), Codigo, Imputacion)


Capture.PNG

4 Replies
MVP
MVP

Re: Order pivot table by expression

Try with a calculated 2nd dimension

=Dual(Imputacion, Aggr(Sum(Cantidad), Codigo, Imputacion))

and sort it using this expression

Aggr(Sum(Cantidad), Codigo, Imputacion)


Capture.PNG

spividori
Valued Contributor

Re: Order pivot table by expression

Well, it works perfect, but, It should not work by checking the option: "By expression" and the expression that we indicate?.

Regards.

MVP
MVP

Re: Order pivot table by expression

It should not work how? Not sure I understand

spividori
Valued Contributor

Re: Order pivot table by expression

Sort by the expression Sum (Quantity) in all dimensions, if I checked that option. Also, if you change the position of the dimensions, the solution that you gave me does not work..

QlikView makes it perfect:

Captura.PNG

Regards.

Community Browser