Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: Sorting Via a Variable

3 Replies

Re: Sorting Via a Variable

Re: Sorting Via a Variable

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

jyothish8807
Honored Contributor II

Re: Sorting Via a Variable

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