Alteryx Designer Desktop Discussions

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

Using iterative macro to transfer a row to specific fields

mbajic
6 - Meteoroid

Hello,

I have a problem. I have a table which consists of multiple rows, for example:

Table 1

NameYearDateActivityHours
John Adams20221/1work50
Adam Smith20222/1project70

 

The final table is not of the same format, for example:

Table 2

   1/12022 
 John Adams work  
     50

Now I need to use the first row data (for John Adams) and transfer it to another sheet/excel file (Table 2) Table 2 is always of the same format.. But then I need to to the same for Adam Smith. Since new people will be regularly put to that table is there a way to make the process repeat itself by creating a loop with each new row until there are no more names. I heard that Iterative Macro is a great tool. Also it is very important to put each set of rows in separate worksheets or excel files.

I hope I described the problem well. Thank you to anyone who helps in one way or the other.

 

Best regards,

Matej

2 REPLIES 2
OllieClarke
15 - Aurora
15 - Aurora

Hi @mbajic 

 

How's this for an approach:

OllieClarke_0-1650636265357.png

 

which outputs this:

OllieClarke_1-1650636291359.png

 

We can then use the RecordID field in the output data tool to output each person into their own sheet in the excel

OllieClarke_2-1650636362314.png

Hope that helps :)

 

Ollie

mbajic
6 - Meteoroid

I have been trying using your workflow and I cannot get it right, but it is exactly what i need. When I use my real input everything just connects to single row.

This is exactly how my first tables looks like.That happens in cross tab tool

NameHoursActivityDate 1Date 2Month YearFile_Name
John Adams50project1/1/20222/2/2022Dec2022AdamsHours

 

Can you explain how you used the second formula and cross tab tool, just so I can get similar result as you. And also how to know precisely to which cell the data goes:

John Adams goes to C4

50 goes to B11

Project goes to A10 

1/1/2022 goes to B26

2/2/2022 value should go to E29 cell.

Dec goes to B7

2022 goes to C7

AdamsHours goes to F1

 

Thank you for your first response, I hope you will help me with this question as well and sorry for the long question.

Kind regards,

Matej

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels