Alteryx Designer Desktop Discussions

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

Sorting by character

rjbrsh
7 - Meteor

 

I have a sorting problem.

If I sort using the sort tool and descending order, I get 

Nameid
ABCD1234
ABCD876

 

But, I needed my data to be sorted by character. 

Output I need after sorting descending based on character:

Nameid
ABCD876
ABCD1234

Is there a way to do this? 

Any help will be much appreciated. 

5 REPLIES 5
Hammad_Rashid
11 - Bolide

Capture.PNG

 

Capture.PNG

cjaneczko
13 - Pulsar

You can add a Select tool and change your ID to a String field. Then sort decending with the Use Dictionary Order unchecked.

 

image.pngimage.png

rjbrsh
7 - Meteor

Thank you much, appreciate your help. This works for numbers but if the characters are alphanumeric, it doesn't work. Any way to fix that?

rjbrsh
7 - Meteor

@Hammad_Rashid  Thank you much, appreciate your help. This works for numbers but if the characters are alphanumeric, it doesn't work. Any way to fix that?

CoG
13 - Pulsar

@rjbrsh, Did you see @cjaneczko's Solution? It should do exactly what your looking for, where as @Hammad_Rashid's will perform a character based sorting, it will only sort on the first character. If you want all characters considered that will not work for you. I am attaching that workflow for you to look at, but please give credit to @cjaneczko, if his original response was the solution you were looking for.

Labels