Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
MoxieMeister
Contributor II
Contributor II

Sorting two level column

Hi all,

I have some problems with sorting in the column name levels.

My try is:

!!!.png

 

 But necessary make like this:

11.png

Cannot swap columns level.

 Is it possible?

Thanks.

 

 

Labels (2)
3 Replies
Anismohamed32
Partner - Contributor III
Partner - Contributor III

Hi ,

You can sort the column at your own wish , by having if condition in the sorting tab.

1. click the sort option
2.write if condition by selecting the option set by expression.
3. if condition example :
=if(group='M27',1,
if(group='Axis',2,
if(group='Black',3,
if(group='GSC',4,
if(group='T3',5,
if(group='TDM,6,7)

MoxieMeister
Contributor II
Contributor II
Author

Hi,

The basic idea of sorting is to ignore the sorting of the first header.

In this case, test data is presented. In the original, data is added dynamically.

Accordingly, this 'If' does not universal approach.

Thanks.

Anil_Babu_Samineni

Try this as a Sort by expression

Match(Group, 'M27','Axis','Black','T3','TDM')

If not, Create Mapping field in the script with some serial no to form same as that field

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful