Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting Expression Column

I have a SalesForecast pivot table with Region, Sales Person as dimension, sum(Sales) as Expression grouped by month. There's a row total at the end. I want the result is sorted by the Total asccendingly for each region. But I am not able to sort by the total expression. Anyone can help?

Region Sales Jan09 Feb09 Mar09 Apr09 May09 Jun09 .... Dec09 Total

ASIA John 30 25 40 50 55 350

Peter 10 15 20 10 10 120

EUROPE Rose 15 30 18 40 180

Alex 50 65 40 80 80 70 580

8 Replies
Not applicable
Author

Hi,

could you post an excample?

Alex:)

Not applicable
Author

Hi Here's the example file.

I want to sort by the Total Sum per Sales Group regardless of Location order

Not applicable
Author

The way to do it is to use the aggr functionality in the sorting expression.

Try sorting the dimension Sales on the following expression:


sum(aggr(sum(Unit),Sales))


Hope it helps!

//Jakob

Not applicable
Author

Hi Jakob,

Still not able to sort in the way I want. I have tried this sorting expression in Sales or LOC dimensions, but both didn't work as well.

Not applicable
Author

I have attached an example, based on your file, which shows what you want hopefully.

//Jakob

Not applicable
Author

Hi, thanks for your help. But that's not the result I am looking for. Sorry that I am not explaning clearly. Here's the result I would like to see. Please help~~

Order I want to have for XGAXFAK_PAUX group which is order by the total inside each Sales group:
CLPUQ - 21
MXZLO - 21
CLSVE - 24
CL073 - 47
CLANF - 52
CLSAI - 379
PECLL - 589
CLIQQ - 758

Not applicable
Author

Hi, any expert can help? Many thanks in advance...

Not applicable
Author

You'll find that it is sorting based on total sales for the LOC not on the combination of Sales-LOC. in other words the dimension is ignored. i'm not sure this is a bug or by design...