Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to sort fields according to my own choice

how to sort fields according to my own choice

EXMPL:  A

              K  

              Y 

             W

             S     

thes  are the fields and i want to sort them like this

       

            S

            A

           W

            K

            Y   

I dont want to sort them according to character or number,how can i achieve my goal to sort the fields

1 Solution

Accepted Solutions
neetu_singh
Partner - Creator III
Partner - Creator III

Hi Kumar,

You can sort the fileds according to your choice by using Mapping Load in your script.

As mention in attached document, you can view the sorting filed into Sheet 1 Tab.

Thanks

Neetu

View solution in original post

3 Replies
Not applicable
Author

You can create a new filed with the sort order number and use that field for setting the sorting. Look at the example below.

Data2a:
LOAD * Inline [
  myField1
  A
  K
  Y
  W
  S
];

Data2b:
LOAD * Inline [
  myField1, mySortOrder
  A,2
  K,4
  Y,5
  W,3
  S,1
]

MayilVahanan

Hi

You can use dual() function in script level.

Or

Match(FieldName,'S','A','W','K','Y') function in Sort tab -> expression

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
neetu_singh
Partner - Creator III
Partner - Creator III

Hi Kumar,

You can sort the fileds according to your choice by using Mapping Load in your script.

As mention in attached document, you can view the sorting filed into Sheet 1 Tab.

Thanks

Neetu