community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Knowledge Base

Definitive answers from Designer experts.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
Announcement | We'll be doing maintenance between 2pm - 5pm MT, which may impact your experience. Thanks for your patience as we work on improving the community!

Tool Mastery | Sort

Community Content Engineer
Community Content Engineer
Created on

Sort.pngThis article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Sort Tool on our way to mastering the Alteryx Designer:

 

Often times in data preparation, the need for order in your records will arise. When that situation occurs, the Sort tool has your back. It’s just that sort of tool. Effortlessly arranging your records – be it alphabetical, numeric, or chronological in order – while not quite a mind-numbingly complex operation, has ample utility. Sorting your records upstream of many tools can even optimize processing time. The fairly simple use cases below are techniques that frequently pop up in the data blending trenches:

 

sort.png

                                                  Sort Tool, left, helping an analyst take their shots

 

  • Enforcing order for consistent Multi Row Formula calculations (attached in the workflow Sort.yxzp)

1.png

 

  • Listing records in chronological order for reporting (attached in the workflow Sort.yxzp)

Using the Summarize Tool’s (master it here) “First” and “Last” actions are only useful when you know which records will be first and last. The easiest way to do that is to apply a quicksort:

 

2.png

 

  •  Order-based record selection (attached in the workflow Sort.yxzp)

3.png

 

Note: The Sort Tool also has a checkbox option to "Use Dictionary Order" that will sort beyond ASCII string characters. Using this feature will impact the speed of your sorts.

 

By now, you should have expert-level proficiency with the Sort Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Attachments
Comments
Asteroid

Thanks @MattD, great write-up.

 

Just wanted to note one thing that I found out today. If you accidentally check the "Use Dictionary Order", and are trying to sort chronologically, it can* mess up your sort order. I had this issue on a sort before Dynamic Input causing me to pick up the wrong file. I'm hoping we can have a date field override the Dictionary Order in a future enhancement, but not sure if that will happen.

 

I also haven't tested, but I would assume this would be an issue if you were trying to sort Chronologically and by a String, unless you used separate sort tools. 

 

*(did for me, maybe not always?)

I think you left out the case where the user decides the order with a personalized list, for example, I have the following possibilities of status for an item:

 

Active 

Inactive

Delete

 

If I want the inactives to be ordered above the deleted ones, the alphabetical order won't work as it will rearrange them as folllows:

 

Active 

Delete

Inactive

 

How can I assign the order of my prefrence?

 

Regards

 

Hey @rafialmadrid : did you get the answer to your question?