Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Using Conditional Statements to Change your Data

nick22
8 - Asteroid

Hi everyone,

 

I am working with one spreadsheet and need to duplicate a row if the Identifier equals the identifier above it.sales rep.PNG

 

Above is a sample from my data.

 

What I am trying to do is duplicate the row where [Opp-id]=[Opp-id].

 

Is there a way to do this in a formula in alteryx or would this be best done in an excel macro?

 

Thank you,

Nick 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@nick22,

 

I solved this by checking to see if the row above equals the current row (set flag).  Then I copied all rows.  Then I filtered to keep the first rows plus any that were previously calculated to generate a new row.

 

Capture.PNG

Maybe @SeanAdams might improve on this.  The generate rows tool could be used with proper conditional logic applied, but I was getting "wrong" results and opted to go for K.I.S.S. to get you to the right results.

 

Cheers,

Mark

 

P.S.  @nick22, I forgot to include the solution workflow.  Now it is attached.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
nick22
8 - Asteroid

@MarqueeCrew

 

Thank you for getting back to me so quickly. Can you show me how the tools are configured? I'm unsure how to use these tools.

SeanAdams
17 - Castor
17 - Castor

:-) thanks for the ping @MarqueeCrew

 

@nick22 - I've tackled this slightly differently than Mark, but included both solutions here.

The way that my version works is that it uses Mark's multi-row formula to see whether an oppID is duplicated, and then if so, it adds this row back to the set using a union.

 

All the configurations and flows are in screenshots (and attachments) below.

 

Hopefully this solves your problem - if so, would you mind marking as solved - if not, just reply with follow up questions and we'd be glad to iterate with you.

 

2017-05-22_9-31-50.png

 

2017-05-22_9-32-18.png2017-05-22_9-32-39.png

 

 

Labels