In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx IO Discussions

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Values concatination

AS
8 - Asteroid

Hi Expert,

Just a quick question. how I can create this output. @atcodedog05 

P CodeZ codeOutput
116AA,B,C
123ZZ,X,Y
123XZ,X,Y
116BA,B,C
123YZ,X,Y
116CA,B,C
153SS
3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @AS, you can do this by using the Summarize tool to group by P code and create a concatenated list of the corresponding Z codes, then re-join to the original dataset based on P code:

 

DataNath_0-1679317508885.pngDataNath_1-1679317519529.png

 

If you're precious about the order of records, just use a RecordID and then sort by that to finish:

 

DataNath_2-1679317577501.png

AS
8 - Asteroid

Hi Thanks for the reply.

 

Can you tell me if Output Column is containing "A,A,B,B,B,C,C" value and we need output as "A,B,C". 

DataNath
17 - Castor
17 - Castor

Hi @AS, do you mean for when you have a bunch of the same P/Z codes like so:

 

DataNath_0-1679318569019.png

 

And get an output like this:

 

DataNath_4-1679318652723.png

 

If so, just place a Unique tool before the Summarize, selecting both fields:

 

DataNath_2-1679318603235.pngDataNath_3-1679318610918.png