Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
andy
Partner - Creator III
Partner - Creator III

How to interactively change the sorting of a pivot table?

Hi Folks,

I have a pivot table sorted in a manner but I want the user to be able to change the sorting. I thought of a button which triggs a macro but as far as I understand the automation interface there is no sorting feature available for the pivottable.

You can set a lot of properties for the pivottable but not the sorting even though this thread suggested that

http://community.qlik.com/forums/t/17400.aspx

Any other suggestion on how to solve the issue or do I have to make another pivot table?

/Andy

3 Replies
Or
MVP
MVP

I'm not aware of any built-in solution. I use a workaround: create a variable and use that in your Sort expression. It's not as clean as the simple double-click you get with straight tables, but it does work.

andy
Partner - Creator III
Partner - Creator III
Author

Ah!

That was simple and smart!

But you cannot toggle ascending/descending in that way can you?

/Andy

Or
MVP
MVP

Again, only using variables - your variable SortBy could have the values:

Column1 - Ascending

Column 1 - Descending

Column 2 - Ascending

Column 2 - Descending

You could then break down the value using an If() statement.