Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Create new rows based on conditions

anhdo92
8 - Asteroid

Hi,

I have a dataset that looks like below

anhdo92_0-1581551373567.png

What I wanna do is to generate new rows based on certain conditions such as:

If Company Entity is MBB then generate 2 more rows with ProcessingOrg PM-MBB-A11SG  AND PM-MBB-A11UK 

If Company Entity is MIMI then generate 1 more row with Processing Org PM-MIMI-HQ8SG

If Company Entity is MBP then leave Processing Org as it is

 

Output should look like this

anhdo92_1-1581551681929.png

 

Any help is appreciated!


Thanks

 

3 REPLIES 3
DavidP
17 - Castor
17 - Castor

This is how I would do it

 

DavidP_0-1581552832162.png

 

Hugo
9 - Comet

DavidP's solution is elegant and probably faster than my approach.

 

The approach I would have taken would be to create a text file with the CompanyEntity and the required suffixes, then to perform a join on CompanyEntity, with a formula tool afterwards to modify the ProcessingOrg

anhdo92
8 - Asteroid

Perfect! Thanks guys!

Labels