Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Sort by If Contains?

jwlam
8 - Asteroid

Hi everyone,

 

I'm trying to sort my data by if the email address contains a company's name or not. But the Sort tool doesn't really work for that and I'm not looking to filter it out either. I want all the data to stay together just sorted so end users can see internal vs external clients in the reports more easily. 

 

In the example below I'd like the Internal email addresses to be sorted by if it contains "Internal" and be on top of the other emails that don't contain "Internal".

 

Original Data

 

First NameLast NameEmail
AbeLincolnAbe.Lincoln@Internal.com
JaneDoeJane.doe@External.com
JohnSmithJohn.Smith@Internal.com
TomJeffersonTom.Jefferson@External.com

 

Desired Result

 

First NameLast NameEmail
AbeLincolnAbe.Lincoln@Internal.com
JohnSmithJohn.Smith@Internal.com
JaneDoeJane.doe@External.com
TomJeffersonTom.Jefferson@External.com

 

Thanks!

2 REPLIES 2
DataNath
17 - Castor

Would this work @jwlam? Just creates a flag where internal is lower than external and so when you sort ascending on the flag they'll all sit at the top. I can't think of any way to do the contains check and sort in one.

 

DataNath_0-1655759145072.png

 

jwlam
8 - Asteroid

@DataNath That worked perfectly. Thanks!

Labels