Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Batch macro logic

kat
12 - Quasar

I ran into a problem where I had to fill-down the data to replace missing values.

 

The data looks something like this

Start.PNG

And should end up looking like this

End.PNG

 

My actual data has a lot more columns that need to be filled down and so I thought that a batch macro combined with a multi-row formula would make the most sense. I've attached my approach. This doesn't work though, as it is only fixing one of the columns, not all.

 

I've since solved this problem, using the macro provided here . I however want to know why my approach doesn't work - how does the batch macro run through the data that prevents this from working?

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

There's a couple of things here.

 

Firstly, if you look at the configuration of your action tools, they are looking to overwrite the string 'DATE', which does not exist in the selected variables, and therefor nothing is being replaced with the value passed into the parameter.

 

Secondly batch macro's are designed to process groups of rows at a time not groups of columns and therefor the logic doesn't really work here.

 

Once you make the above change then your resulting data stream looks something like this.

BatchProblen.png

You see it is manipulating every column but it's replicating your dataset for each different 'iteration' or each column change you are making.

If you are trying to perform the same manipulation against multiple fields then always transpose those columns into a single column, and that's exactly what the macro you linked out too does :)

I hope this helps!

Ben

kat
12 - Quasar

Thanks, Ben!

 

The DATE string was still from my original data - sorry!

 

I never thought to look at how the number of rows is increasing... Makes perfect sense now, thanks!

Labels