Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

sarasmonu
New Contributor III

User to be able to Select type of sorting it needs

Hi All,

Below is my requirement:

I have a pivot table with Date in the row which by default is arranged in descending order.

I want an option to be available for user to select if they want it to be viewed as ascending or descending.

Say i can have a drop down : Ascending and Descending

If the user selects "Ascending" the date should be arranged in ascending

if the user selects "Descending" the date should be arranged in descending.

Please help.

Thanks,

Monu

3 Replies
YoussefBelloum
Esteemed Contributor

Re: User to be able to Select type of sorting it needs

Hi,

1. create an inline table [Sorting], with sorting Field, with Values: Ascending, Descending

Sorting:

LOAD * Inline [

Sorting

Ascending

Descending

];

2. on your pivot table, on the sorting area, uncheck all and put Date_field on top, with expression like this on Ascending:

=if(Sorting='Ascending',Max(Date),-Max(Date))

Now you can use a listbox to show a drop down list (ascending/descending) to change the Date sorting.

sarasmonu
New Contributor III

Re: User to be able to Select type of sorting it needs

Thank You Youssef!

This was very helpful

YoussefBelloum
Esteemed Contributor

Re: User to be able to Select type of sorting it needs

You're welcome.

As soon as it is OK for you, don't forget to close the thread my marking the Correct and helpful answers.

Good luck

Community Browser