Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting Via a Variable

Hi All,

I have a variable vTB, its either on or off (0/1)

When the button is clicked, the variable is updated to the alternative, i want the order of my table then be sorted in the following way:

pseudocode:

if vTB=1 then sort based on [Total Volume] ascending else sort on [Total Volume] descending

Anyone???

Thanks

1 Solution

Accepted Solutions
3 Replies
tamilarasu
Champion
Champion

Hi Stephen,

Below link might be helpful.

Sorting a straight table based on expression via a button

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

As far as I know there is no function to do the sorting based on condition.

The only workaround I can think of is, you keep 2 charts sorted as per your requirement.

When your Variable is ON you show one chart and second will be hidden and same way when your variable is OFF you show the hidden chart and Hide the shown chart.

You can get that idea from below link.

QlikView App: Show and Hide Windows Dynamically

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jyothish8807
Master II
Master II

Hi Stephen,

What you can do is create two dimension or expression and set one in ascending order and other in descending order.

Now put conditional show on both dimension or expression and show only one at a time.

Hope this trick will fulfill your requirement.

Regards

KC

Best Regards,
KC