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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Double sorting in Pivot Table

Hi,

I would like to sort two dimensions with expression in a pivot table.

I've 3 dimensions : Country, Product, Year and 1 expression Sum(Sales).

Country I Product I Year 2010 I Year 2009.

I would like to sort Country by Year 2010 (sum({<Year={2010}>] and sort Product by Year2010.

The sort by country is Ok but it doesn't sort by Product.

Can you help me ?

1 Solution

Accepted Solutions
Not applicable
Author

It works as it should. See the attachment. Your products are sorted by the expression in descending order.

View solution in original post

14 Replies
pover
Partner - Master
Partner - Master

Assuming you are using the sort by expression in the Sort tab and that the expression is sum({$<Year={2010}>} Sales) for both dimensions then I don't see a problem with this.

Post a screenshot of what the table looks like.

Regards.

Not applicable
Author

Yes it is exactly what I've done but the sort is not good on the Product. It only work on the first Dimension

Not applicable
Author

It works as it should. See the attachment. Your products are sorted by the expression in descending order.

johnw
Champion III
Champion III

I gather you want your Product list to be sorted differently for each Country? Pivot tables currently do not sort that way. Every Country will have the Product list sorted the same. The product list IS sorted by sum({<Annee={'2010'}>} CA), but for the total across all countries, not within each country.

There is an open request to add an option to QlikView to allow it to sort in context. In your case, such an option would allow you to sort differently by Product within each Country. So far as I know, there is no way to do it presently. I do not know if there is any new option in version 10. I'm on version 9 SR6.

Here's the link to the request on the customer portal. If you have access to it, you could vote for it, and perhaps they'll address it some day.

https://emea.salesforce.com/ideas/viewIdea.apexp?id=087200000008T02

Not applicable
Author

Product are sorted by Sum(Sales) for Year 2010.

But i would like to sort product for each country : Product 100 should be first in country 2 and Third in country 1.

How can i do that ?

Thanks

Not applicable
Author

Ok thanks John.

Not applicable
Author

John,

It still doesn't work in version 10 either (10.00.8715.5 IR)

Not applicable
Author

But it already works in your dashboard if you would treat it in appropriate way. All what you need is just pick one country only. See attachment. I've updated it a little bit 🙂

pover
Partner - Master
Partner - Master

You can do it if you make an expression for each year and sort by the y-value like the attached example.

Regards.