Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Creating a new column based on certain criteria

CCrawford94
7 - Meteor

I need to add a reference column to my data after every Field name that contains "123". The below data is how i would expect it to look when it comes out please let me know if you can help. Im trying to make this dynamic because in the field i am in i will be receiving multiple different columns but they will always have 123 in the name.

 

Car123Refbag123RefDog123Ref
      
      
      
      

 

Any help is greatly appreciated!

 

Thanks

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Here's one way to approach the problem (attached), but it's important to note it won't be possible to get your desired result exactly as you cannot name multiple columns with the same name in Alteryx.

The attached example also doesn't take into account the sort order, if that's something that you need to get right let me know and I can ammend the logic accordingly!

 

Ben

BenMoss
ACE Emeritus
ACE Emeritus

And here is a version that gives the position after the current field.

 

Ben

CCrawford94
7 - Meteor

Thank you for both replies these worked great!

Labels