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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Sorting in Pivot not working

Hey,

I am trying to sort the data in my Pivot table based on expressions but it is not appling to Desk = 'Others'.

I ahve attached the excel sheet and .qvw . Please let me know about the solution.

Thanks

10 Replies
Anonymous
Not applicable

Let me try...

Say, you have sales by Country by Year:

Canada     2014     2015

                  45        35

USA          145      235

The result of aggr(sum(Sales), Country) returns array:

80, 380

where 80 is for Canada and 380 for USA.

To use it, you need to aggregate it further, to get sum, or avg, or min, or max...  For example:

sum(aggr(sum(Sales), Country)) returns 460

avg(aggr(sum(Sales), Country)) returns 230

max(aggr(sum(Sales), Country)) returns 380

...