Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

i need to concatenatetwo strings together, but sort them alphabetically before concatenati

Matthew
11 - Bolide

say for example "YYZ" and "YYC"  needs to become "YYCYYZ" because alphabetically, YYC comes first

 

is there any way to do this with a single formula tool?

8 REPLIES 8
Garabujo7
Alteryx
Alteryx

Hello @Matthew ,

 

With just the formula wouldn't be possible.

You'll use a Sort and the a Formula:

 

Garabujo7_0-1634596660926.png

 

 

Why do you need to do it on the formula?

Gabriel

Matthew
11 - Bolide

because the sort function sorts rows, but these values are on the same row

Luke_C
17 - Castor

Hi @Matthew 

 

Here's an example:

 

  • Transpose the 2 columns that have data
  • Sort them alphabetically
  • Use the summarize tool to concatenate.

 

Luke_C_0-1634597716915.png

 

Matthew
11 - Bolide

it isn't pretty, but i found a solution.. i created a unique ID, transposed into rows based on the ID, sorted, then cross tabbed back into rows based on the ID... there should be a concatenate formula with a "sort" argument

NothingButThyme_0-1634597407869.png

 

Luke_C
17 - Castor

Hi @Matthew I'd definitely recommend leveraging the summarize tool to concatenate, it can make things much simpler.

Matthew
11 - Bolide

thanks luke, this solution works, i wish there were a simpler solution. something like " Concatenate( [Field1], [Field2] , "Sorted" ) "

 

but in lieu of that, i'll go with your idea. thank you

Luke_C
17 - Castor

Hi @Matthew You could always submit an idea, I'm sure others would appreciate that functionality!

 

Alteryx Designer Ideas - Alteryx Community

 

Matthew
11 - Bolide
Labels