Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

priyarane
Contributor III

Pivot table sorting

Hi Community,

I wanted to perform sorting based on for ex; Sum(sales) - first expression in my pivot table and other too.

I have 4 calculated dimensions like

1. =if(IRB_WR_Type = 'Wholesale' ,if(isnull(IRB_Category),'CRR Unallocated',IRB_Category)) as Dim1

2. =if(IRB_WR_Type = 'Wholesale',if(IRB_Band = 'CRR_U',' ',IRB_Band)) as Dim2

3. =if(Match(IRB_Band,'CRR_U') > 0,' ',Num((IRB_Lower_Band*100),0.000)&'%') as Dim3

4. =if(Match(IRB_Band,'CRR_U') > 0,' ',Num((IRB_Higher_Band*100),0.000)&'%') as Dim4

How can I achieve this

8 Replies
MVP
MVP

Re: Pivot table sorting

Is there a sample that you can share?

priyarane
Contributor III

Re: Pivot table sorting

Hi Sunny,

It is huge qvw

dinuwanbr
Contributor III

Re: Pivot table sorting

Hi Priya,

Don't upload the full file. Just about few rows to understand your requirement.

Rgds,

tharindu

balrajahlawat
Esteemed Contributor

Re: Pivot table sorting

Sorting based on what??

A pivot table is always sorted first after the first dimension, then the second dimension, etc. This is necessary since the rows are grouped first after the first dimension, then the second dimension, etc. If you want to sort after an expression, you should use a straight table instead.

priyarane
Contributor III

Re: Pivot table sorting

Hi Balraj,

It is pivot. I need to sort on expression

priyarane
Contributor III

Re: Pivot table sorting

Hi,

I have added sample data.

I wanted to have sort based on Expression and pivot table

priyarane
Contributor III

Re: Pivot table sorting

Hi Sunny,

I have added sample data

Not applicable

Re: Pivot table sorting

Hi

sorting is not possible in pivot table instead of that you can use straight table for sorting

regards

ajay