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

Unique ID Pattern

Afammy
7 - Meteor

I have survey data that looks like this and I want to append a uniqueid (1-3) every 3 rows of the name:

Afammy
Yes
Afammy
No
Afammy
Maybe
JoeShmoe
Who knows
JoeShmoe
It's possible
JoeShmoe
Why not

 

My output should look like this:

RecordIDNameResponse
1AfammyYes
2Afammy No
3AfammyMaybe
1JoeShmoeWho Knows
2JoeShmoeIts possible
3JoeShmoeWhy not

 

RecordID tool not helpful here, can't seem to find a formula, and regex looks for patterns but in the data. I think this is a simple enough task but confounded at the moment- maybe been at it too long! Thanks for any help you can offer.

4 REPLIES 4
dataMack
12 - Quasar

Use the 'Multi-row formula' tool- your formula would check the row above to see if it is null or 3 and if so, enter a 1, otherwise +1 from the value above.

Kanderson
10 - Fireball

The tile tool will do this if you set the tile method to "unique value" and the unique field to the respondants name. You can also use the multi row formula tool as well.

patrick_digan
17 - Castor
17 - Castor

@Afammy I'm late to the party but I would use a mod formula like this one:

MODULO([RecordID], 3)+1

You could either use use a RecordID tool followed by a formula or a Multi-Row formula.

Afammy
7 - Meteor

Thanks all,the multi tool would have worked also. I chose the Tile tool because I hadn't used it yet and seemed like the easiest option- now I've added another tool to my tool box. Can't say enough about the expertise and responsiveness of this community. Much appreciated!

Labels