Alteryx Designer Desktop Discussions

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

Multiple Row Pivot Macro

brightonle
6 - Meteoroid

I need to pivot null records that contain activity data to the program on top into one record for each program. I want to create a batch macro but am new to it so am not sure how I would implement since the activity data contains around 20 more columns needing to be joined to one program record for the actual dataset that I am working on. 

2 REPLIES 2
AGilbert
11 - Bolide

Here is an example of how a batch macro could be configured. The only unique thing about this config is that the Interface Designer -> Properties -> Output Mode = Auto Configure by Name (rather than the default which errors if each output is not of the same schema). This is necessary because each program has different number of activities causing more, or less, fields to exist on each output. 

 

If you define what your expected output should be we can adjust this macro to fit your needs. 

 

macro.png

output.png

 

 

brightonle
6 - Meteoroid

This is a great start, however I want new columns not made, not it concatenated to one column. In this workflow I provided the input and output with the dataset contain program data (marked as 'p') and activity data (marked as 'a'). I want it so additional activity data is newly added columns to the main program record. I provided a sample of what my input looks like however I would have many more null records underneath that need to be newly added to one program record. 

Labels