Free Trial

Alteryx Designer Desktop Discussions

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

Generate column in a dataset based on count stored in previous column

omar_velor
7 - Meteor

Hi all,

 

Can you give me a hand with the following task?

 

Considering a simple table,

 

IDCount
A2
B1
C3
D4

 

I would like to create a third column with the concatenation of the ID and the number of counts, separated by commas. The output should look like this,

 

IDCountID-Count
A2A-1, A-2
B1B-1
C3C-1, C-2, C-3
D4D-1, D-2, D-3, D-4

 

Cheers!

2 REPLIES 2
FrederikE
13 - Pulsar

Hey @omar_velor,

 

You can generate a row for each count-unit and then concatenate it again. See the attached WF. 

FrederikE_0-1686827326727.png

 

ShankerV
17 - Castor

Hi @omar_velor 

 

One way of doing this.

 

ShankerV_0-1686827730154.png

 

Step 1: Input

 

ShankerV_1-1686827764159.png

 

 

Step 2: 

ShankerV_2-1686827778604.png

 

 

Step 3: 

ShankerV_3-1686827794529.png

 

ShankerV_4-1686827803053.png

 

 

Step 4:

 

ShankerV_5-1686827817779.png

ShankerV_6-1686827825455.png

 

Step 5:

 

ShankerV_7-1686827840288.png

 

ShankerV_8-1686827848128.png

 

Step 6;

 

ShankerV_9-1686827864288.png

ShankerV_10-1686827872343.png

 

Many thanks

Shanker V

Labels
Top Solution Authors