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

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
Champion
Champion

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
Creator
Creator
Author

Thank You Youssef!

This was very helpful

YoussefBelloum
Champion
Champion

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