Hi, I am working on an alteryx workflow and I'm trying to achieve a certain behavior that I have trouble getting to with my currently beginner knowledge. The workflow first imports an excel table which looks a bit like this:
Name Age Height Married
Row 1 Anna 18 1.56 Yes
Row 2 Dave 23 1.78 No
Row 3 Don 21 1.66 Yes
Row 4 Mary 25 163 Yes
I need an expression/formula (I don't know which tool would be best for this) that will search the column "Name", and every time the name "Dave" occurs, a specified number of new rows will be added below it with the same values, except the married status changes to the opposite value of the original row.
What's the best way to achieve this?
Solved! Go to Solution.
Hi @AkisM
Interesting use case! I'd probably do it this way (also attached). You can go into the generate rows to select how many rows of Dave to add underneath (here I've added 2 additional lines)
Hope that helps. And that Dave's ok.
Andy
@andyuttley we're tripping over each other today 🙂
By which I mean, you're beating me to most solutions 😉
Both of you beat me to it! I like both solutions
To be fair I did waste about 10 minutes trying to pick the best 'Dave' image for my macro.
10 minutes well spent @jamielaird - big fan of the macro image
Trying to think why Dave's status changes so much; maybe he's had one too many rows LOLLL