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: 
Not applicable

Multi dimension sort in pivot

Hi all,

i have searched through the various threads in qlik community, but couldnt find solution for this issue..

Please refer to the pivot table in attached QVW file.. Actual pivot in my application is more complex than this with additional dimensions, etc.

The sample pivot has 2 dimensions and I would like to implement below sort order -

- first dimension should be sorted alphabetically

- second dimension should be first sorted by an expression using MNC_Integer and then by alphabetically.

Problem is some values from second dimension field has different MNC_Integer for corresponding TEAM_BNKR.... for example, HYUNDAI has MNC_Integer 2 for "LLL - BBB" whereas its 1 for "LLL - RRR"...  in this case, Hyundai should appear after all MNC_Integer=1 clients...

Appreciate any help... thanks!

5 Replies
qliksus
Specialist II
Specialist II

Hi,

Could you please expalin how u want the output with snashot?

Not applicable
Author

First dimension - LLB - BBB followed by LLL-RRR  (already working)

Second dimension - within LLL - BBB and LLL-RRR, first sort by High, Med, Low and within each High/Med/Low bucket, sort client names alphabetically.

So for example, BANK OF BARODA should appear first for LLL-BBB and HYUNDAI should be after all the High clients.

Not applicable
Author

Also tried with AutoNumberHash128 function to create a key using TEAM_BNKR, MNC_Integer, ENTTY_NM

But LLL - BBB, 2, HYUNDAI has lower key than LLL - BBB, 1, BANK OF BARODA..

I would have expected LLB - BBB, 1, BANK OF BARODA to get key as 1..

qliksus
Specialist II
Specialist II

Hi,

If you use straight table instead of Pivot, then you will get the desired output(Checked with Straight table , looks fine).

Is there any particular reason to use Pivot table?

vikasmahajan

Sorting for Multiple Dimensions not works in Pivot table you can use straight table insted of pivot table.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.