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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.9

The latest release includes several enhancements designed to improve your Community experience!

Learn More

For Loop and Appending Rows

My requirement is to essentially add 3 rows to define the tables below, defined as

 tables: a,b, and c

 

Essentialy I want to tell Alteryx:

For i in range

where i doesNotContain digit

Append 3 rows

 

 

My Dataset looks like pic attached

 

Based on what you describe I would suggest:

 

2018-12-08_21-39-45.png

 

- Add a record id tool (this will create an index column called RecordID)

- Add a filter on Mod(RecordID,3) = 1

- You can then create a Table name for every three rows

- Next union this back with the data with the RecordID (ensure the tool is configured to put the filtered data first)

- Sort on RecordID and you should have the extra rows added.

- Finally, you can use a Select tool to remove the extra RecordID column

 

Sample attached showing what I mean

Labels