Values concatination
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
AS
8 - Asteroid
03-20-2023
05:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Expert,
Just a quick question. how I can create this output. @atcodedog05
P Code | Z code | Output |
116 | A | A,B,C |
123 | Z | Z,X,Y |
123 | X | Z,X,Y |
116 | B | A,B,C |
123 | Y | Z,X,Y |
116 | C | A,B,C |
153 | S | S |
Labels:
3 REPLIES 3
DataNath
17 - Castor
03-20-2023
06:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
If you're precious about the order of records, just use a RecordID and then sort by that to finish:
03-20-2023
06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
03-20-2023
06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AS, do you mean for when you have a bunch of the same P/Z codes like so:
And get an output like this:
If so, just place a Unique tool before the Summarize, selecting both fields: