Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
alanwong1178
Contributor III
Contributor III

Sorting in Pivot table

As I bulit a pivot table  with multiple measure like the example below.

It is possible to make Qlik Sense to sort by Profit measure  in all layer which means client with most profit at the top

and its country with most profitable at the top  of the subgroup

and most profitable product at the top of the subgroup

 

alanwong1178_0-1635126427411.png

 

Labels (1)
12 Replies
NitinK7
Specialist
Specialist

Based on your dimension you have to pass first parameter as same as your dimension 

and remaing parameters no need any order

Eg

your second dimension is client name then firts parameter should be  client name

=$(v_Sort2(client name,country)

add if your third dimension is  product then then firts parameter should be product 

=$(v_Sort3(product, client namecountry))

alanwong1178
Contributor III
Contributor III
Author

alanwong1178_0-1635496831280.png

As you may notice that , use can change the sequence of dimension by dragging the box on the top left corner of the pivot table.

 

For example , by default , ordering is Client , country , product.

If user change the order to   Country ,Client,  product , will those expression still work without manual amendment on the expression?

NitinK7
Specialist
Specialist

I think No, but  you can try this for clarification