Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
abhi1490
Contributor
Contributor

Sorting by expression with no dimension in pivot table

Hi qlik community,

I have been looking around for some hint but no luck. I am stuck with a problem in regards to sort data in a pivot table.

I am creating an adhoc waterfall chart where users can select parameters and see calculated results based on their selections. 

I have a pivot table where we do not have a dimension and we have 4 measure. 

abhi1490_0-1614955627777.png

 

abhi1490_1-1614955734555.png

 

These are my formulas 

 

abhi1490_2-1614955775460.png

 

I want to sort the expression in ascending order or descending order based on the expression value that we get based on the adhoc selections.

abhi1490_3-1614955830879.png

I am trying to use the sorting functionality on the the pivot table, flagging the Descending order sorting by expression but with no luck

Any suggestion on how this can be achieved? I will keep looking if there is a work around.

Thank you in advance for your help. 

-Abhishek

1 Solution

Accepted Solutions
edwin
Specialist III
Specialist III

one brute force approach is to use a valuelist() as dimension:

Valuelist('Total Cusromr','Age', 'Postal Code', 'Customer Segment')

in your expression:

pick(match(Valuelist('Total Cusromr','Age', 'Postal Code', 'Customer Segment'),'Total Cusromr','Age', 'Postal Code', 'Customer Segment'),
count(...),
count(...),
count(...),
count(...))

using your expressions

View solution in original post

3 Replies
edwin
Specialist III
Specialist III

one brute force approach is to use a valuelist() as dimension:

Valuelist('Total Cusromr','Age', 'Postal Code', 'Customer Segment')

in your expression:

pick(match(Valuelist('Total Cusromr','Age', 'Postal Code', 'Customer Segment'),'Total Cusromr','Age', 'Postal Code', 'Customer Segment'),
count(...),
count(...),
count(...),
count(...))

using your expressions

View solution in original post

abhi1490
Contributor
Contributor
Author

Thanks Edwin. That solution worked well.

edwin
Specialist III
Specialist III

yw