Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
waszcma1
Partner - Creator II
Partner - Creator II

Sorting pivot by measure only max Year, or max month or max Year-month etc.

Hi could you help me create the right expression to sort data in pivot table

At the moment I am using SUM(Ammount) in sort by Expression [Descending]

But it works only on total or only for one year selected

I would force sorting always on the last period visible in the pivot table in this example 2019 amounts should sort the records.

There are also hidden view for different periods like Year-Quarter, Year-Monht, Quarter, Month 

1 Solution

Accepted Solutions
waszcma1
Partner - Creator II
Partner - Creator II
Author

HI,

I think i have found solution:

To sort pivot by only latest year I need to use Set analysis in sort by expression:

sum({<Year={$(=max(Year))}>}worker_cost)

Similar for others periods but always just take only max of the displayed period 

View solution in original post

3 Replies
tripatiqv
Partner - Contributor III
Partner - Contributor III

Hi,

 

Please share the sample application

waszcma1
Partner - Creator II
Partner - Creator II
Author

HI,

I think i have found solution:

To sort pivot by only latest year I need to use Set analysis in sort by expression:

sum({<Year={$(=max(Year))}>}worker_cost)

Similar for others periods but always just take only max of the displayed period 

favio220
Contributor
Contributor

Excellent!

Thank you.