Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sort Numbers Largest to Smallest and Smallest to Largest

Sheena_dup_300
6 - Meteoroid

I am new to Alteryx and I don't understand how to sort numbers by Largest to Smallest within a column.  I need 2 fields sorted Largest to Smallest, then after that, I need another column sorted Smallest to Largest to calculate a Multi-Row formula correctly.

Please note that there can be duplication's of all the numbers.

 

Local Member Firm Fees = Largest to Smallest

Other Member Firm Fees = Largest to Smallest

Opp ID = Smallest to Largest

 

See what the final example should look like attached: 

6 REPLIES 6
NicoleJohnson
ACE Emeritus
ACE Emeritus

First, I'd make sure your field types are all number format, so use a Select tool to check field types... then use the Sort Tool and start with the first column you want sorted (Opportunity ID) and sort Ascending... then the next line will be Local Member Firm Fees sorted Descending, and Other Member Firm Fees sorted Descending.

 

 

Sort.JPG

 

NJ

nick_ceneviva
11 - Bolide

You will want to use the Sort tool for this.  You are able to set multiple fields to sort on and choose whether they should be sorted in ascending or descending order.

Sheena_dup_300
6 - Meteoroid

Thank you Nicole & Nick.

ahsankhalid
8 - Asteroid

Hi Nick, 

 

I have the same issue and using Sort tool. 

 

but after 1 the next row shows is 10, 11, 12 .... 19 and then 2.

 

Can you please suggest if there is a way to deal with this. 

 

Regards

Ahsan Khalid

MarqueeCrew
20 - Arcturus
20 - Arcturus
When sorting strings with numbers, the way to get the numbers in order is to use the dictionary sort option (check box) in the sort configuration.

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Davidmg1982D
6 - Meteoroid

Hero, thanks.

Labels