community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How do I use the generate row data to create one additional row of data when certain conditions are met?

Highlighted
I would like to create one additonal row of the same data if a certain string is in two fields of my data in one row. How do I acccomplish this?

For example, if the one of the fields reads "DIRCT', I would like for Alteryx and the generate row data tool to create one additional row of data where all the data remains the same except for one data field. Is there anyone that can help me get off to the right start with this? Thanks!
 
Alteryx Certified Partner
Hi Benjamin,

Easy way, simply filter for "DIRCT" and then change the data that needs changing. Union back together all the original data plus the new data. To use the generate rows tool, you would have to have a 2 stage process whereby you assign a RecordID and multiply it by 2, then use that in your condition as well as Field1="DIRCT".



Kane

I would like to create no. of additional rows based on Field “Rows” value of the same data –


For example of the Input Data –

 

 Name

Location

Rows

Sam

NY

2

David

NJ

1

Joe

HI

4

 

The out result should be –

Name

Location

Sam

NY

Sam

NY

David

NJ

Joe

HI

Joe

HI

Joe

HI

Joe

HI

  

Is there anyone that can help me get off to the right start with this? Thanks!

Alteryx Certified Partner

Hi @viswamtulasi,

 

You might want to create a new post if you can't get the solution provided here working.

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome

Labels