Alteryx Designer Desktop Discussions

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

Iterate select across rows

brizio97
5 - Atom

Hello everyone, I am looking for a way to run a large number of Selects, iterating what fields are being selected, and what those fields are being renamed to.

 

I have a table like the one below: 

 

brizio97_0-1581939545973.png

 For each row following the ID row, I need to run a select that selects, for example:

ID,

'First step' as 'Event',

10/01/2010 as 'Date'. 

For the second row, the select would select 'Second Step' as 'Event', and 11/01/2010 as  'Date'.

This would iterate across all fields. Then the results would be unioned.

This to create a new table with the following fields: ID, event, and date.

With a limited number of rows the easiest way is simply to run separate selects for each row, and then union them.

However I now have a large number of rows so that would be very time consuming.

 

Is there a way to run the selects, iterating what fields are being selected, and what the fields are being renamed to?

 

I have been looking into batch macros, but they seem to only work when iterating over rows.

 

 

 

2 REPLIES 2
afv2688
16 - Nebula
16 - Nebula

Hello @brizio97,

 

Would this be what you are looking for?

 

I got the table as I think you would want it? Could it be?

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

brizio97
5 - Atom

Hi @

 

 

 

Labels