Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to sort measures in a pivot table (Qlik Sense)?

Hi,

how do I sort a pivot table by the measures values?

thanks,

Tal

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In the Sorting, set the measures, or use expression to sort measures there.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

In the Sorting, set the measures, or use expression to sort measures there.

Or
MVP
MVP

Edited to add: After posting my reply, I noticed that you mis-posted your question in the QlikView forum. I have no idea if my answer is relevant for QlikSense, but I'd expect that to be the case anyway.

Generally speaking, it is not possible to sort pivot tables by expressions out-of-the-box.

There's a single exception - you can sort by the first expression's value, as it pertains to the first dimension. For example, if your dimensions are Customer and Month, and your expressions are Actual Revenue and Planned Revenue, you can sort your customers by their total Actual Revenue (without impacting the sorting of months for each customer). This can be achieved using "Y-Value" in the sort screen.

More information - and a proposed workaround I have not personally tested - are available in this thread: Sorting in pivot tables

An explanation of why you can't sort pivot tables by expression, as posted by QlikView's

 

 

Not possible. And it is not a limitation of QlikView - it is a consequence of the properties of a pivot table.

A pivot table is always sorted first after the first dimension, then the second dimension, etc. This is necessary since the rows are grouped first after the first dimension, then the second dimension, etc. If you want to sort after an expression, you should use a straight table instead.

An other aspect is that you try to sort the "Document number" after "Row". But this is not possible since a document can have several row numbers. See also Use Aggregation Functions!

Anonymous
Not applicable
Author

Hi,

how can I set the measures?

I don't want to define for every dimension the relevant measure to be sorted by, i want all dimensions to be sorted by same measure and to set this once.

Thanks!

Tal

paolo_mapelli
Creator II
Creator II

IMHO, "it is a consequence of the properties of a pivot table" isn't true, since this is something Excel does and I don't see a valid reason why Qlik Sense shouldn't do.

QlikkitySplits
Contributor II
Contributor II

Qlik is a very flawed system in my opinion... this seems like something simple that should be in, you know... a data organizing program. the ability to sort data...

I also would like to know how to do this, i will probably have hacked through the haze to the solution by the time i get a response on here though. in which case i will enlighten.