
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to sort elements from a Dimension in a pivot table.
I need to sort elements from a Dimension in a pivot table.
Here is the example expression which i tried in the qlik sense :
if(MATCH(Column_ID1,1,2)>=1 and MATCH(Column_ID2,'V/O')= 0,'V + R', as 1
if( MATCH(Column_ID1,3,4,5)>=1 and ((MATCH(Column_ID2,'V/O')= 1 and MATCH(Column_ID3,'D')= 1) or (MATCH(Column_ID2,'R')=1)),'V/R Days 1-3', as 2
if(MATCH(Column_ID1,6,7,8,9)>=1 and MATCH(Column_ID2,'R')= 1 ,'VR Days 4-7', as 3
if((MATCH(Column_ID1,1,2,3,4,5)=0 and MATCH(Column_ID2,'V/O')= 1 and MATCH(Column_ID3,'D')= 1 ) or
(MATCH(Column_ID1,1,2)=0 and MATCH(Column_ID2,'V/O')=1 and (MATCH(Column_ID3,'D')= 0 OR ISNULL(Column_ID3)))
,'VR 4-35 + A 1-35', as 4
if(MATCH(Column_ID1,1,2,3,4,5,6,7,8,9)=0 and MATCH(Column_ID2,'R')= 1 ,'VR Days 8-35' as 5 )))))
I need to get in the same order which is present in the expression : a. V + R
b. V/R Days 1-3
c. VR Days 4-7
d. VR 4-35 + A 1-35
e. VR Days 8-35 and need to sort on ID as alias names
Please help in this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Varun,
Can you write the same Expression in in Number tab and select the first Dimension(and select Expression radio button copy paste your expression here) so that this Dim will sort depends on the Expression.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rama Sai ,
This Script am using in Qlik sense not in Qlik View.
Please if you have any idea in Qlik sense let me know.
Thanks in advance.
