Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting a straight table based on expression via a button

I have a simple straight table with a 'name' dimension and then a calculated numeric value currently sorted by the expression in numeric order ascending. I need to be able to allow users to sort in ascending/ descending order via a button in the same way as double clicking on the row header controls the interactive sort on a straight table but needs to be via variable/button. I can only sort the dimension via an expression so not sure if this is possible.

Any ideas? Thanks

Capture.JPG

1 Solution

Accepted Solutions
anguila
Partner - Creator
Partner - Creator

You can use a variable to change the sort order, using the sort by expression in the straight table:

img.png

Order by click:

img2.png

I attach you an example.

Regards,

View solution in original post

4 Replies
Anonymous
Not applicable
Author

You can use a conditional expression, where the condition is defined by a variable, and the variable is defined by a button.

But - what's wrong with dbl-clicking???

anguila
Partner - Creator
Partner - Creator

You can use a variable to change the sort order, using the sort by expression in the straight table:

img.png

Order by click:

img2.png

I attach you an example.

Regards,

Not applicable
Author

Thanks David..Just the job!! I'd nearly done that myself but hadn't altered the sort priority. Users don't want column headings on table so cant double click

Thanks

Gavin

vikasmahajan

good one

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.