Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Custom Sort on a String type column

EN6924
10 - Fireball

I have a data -

 

EN6924_0-1641805337766.png

 

If I use a sort tool on column - "Sub-Client Name", it would give me result in ASC or DESC order.

 

How should I use custom sorting? The sequence should be like Row 3,5,18,1,14.......etc 

 

Please guide me.

17 REPLIES 17
atcodedog05
22 - Nova
22 - Nova

Hi @EN6924 

 

You need to have a lookup table with a custom sort order. Use lookup to map order and sort it.

 

Workflow:

atcodedog05_0-1641805918426.png

 

Hope this helps : )

 

AngelosPachis
16 - Nebula

Hi @EN6924 ,

 

What's the logic behind the sorting you are trying to apply? If it's on a field that only contains characters, probably the easiest but painful way to sort it is with a lookup table.

 

You can copy all client names and then manually assign an ID to each one of them, in the order you want those to appear in your sorting, Then you can join back to the main data stream and use that new field to sort your data.

Qiu
21 - Polaris
21 - Polaris

@EN6924 
Agree with @atcodedog05 , if we need a custom sort, we need a definition table as one of the inputs.

EN6924
10 - Fireball

Hello All,

 

We have a Backup software from where we use to fetch backup data on daily basis and create a report in the below format -

 

EN6924_0-1641810823701.png

 

From my experiment, The data I'm getting in ASC order listed below -

EN6924_1-1641810893872.png

 

Need to arrange the row sequence in proper format (by default as suggested by Customer)

 

Note: Monthly backups will not happen on daily basis, so in the first format some fields are blank.

 

@atcodedog05 - Tried to create a lookup table with a custom sort order. Use lookup to map order and sort it. But this is not working. 

 

Kindly suggest.

 

 

 

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @EN6924 

 

Please provide the test.xlsx file or else we won't be able to run the workflow and check.

 

It would be something like below.

 

Hope this helps : )

EN6924
10 - Fireball

The data manually fetched from Backup software and the data will be changed everyday. (test.xlsx)

 

Also uploading the default report format.

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @EN6924 

 

It will be something like below. The Sub-Client Name should for it to get an order and get sorted. Blank ones are unmatched please look into them

 

atcodedog05_0-1641812466374.png

 

Hope this helps : )

EN6924
10 - Fireball

Thanks...

 

I have a query. 

 

In my original sheet it the records are like in these order -

EN6924_1-1641813468444.png

 

And in the solution the result looks like-

 

EN6924_0-1641813355156.png

 

Can it be rearranged properly? Need to submit the report (whatever data we get) in the shared format (pasted first one) 

 

atcodedog05
22 - Nova
22 - Nova

Hi @EN6924 

 

Got it you can do something like below

 

Workflow:

atcodedog05_0-1641814002671.png

 

Hope this helps : )

Labels