Iterative Macro is a type of program or script that operates repeatedly applying a series of operations to it until a specific condition is met. ( In the case of Alteryx, we are nesting a workflow within a workflow to have it run repeatedly )
The dataset is processed one row at a time, and each row is evaluated based on the condition it was given. Once said condition is met, that row of data then gets updated to complete. Each will will be evaluated and updated until all rows in the dataset returns true. In Alteryx, the repetition process can have a limitation set to it. Meaning it will end the process after a set amount of runs. This is to stop and run that has been going on for far too long.
The key advantage of an Iterative Macro is that it allows you to automate complex data processing tasks that would be difficult or impossible to perform manually. By defining a set of rules and formulas that can be applied to the data, you can ensure that the processing is consistent and accurate, even when dealing with large datasets or complex calculations.
In addition, an Iterative Macro can be used to refine and improve your data over time, as you can set conditions that check for specific patterns or anomalies in the data, and then apply corrective measures to address them. This can help you to identify and correct errors, improve the accuracy of your data, and gain deeper insights into the underlying trends and patterns that are driving your business or research.
Now moving on to building an Iterative Macro in Alteryx.
First you need at least 1 input, 2 outputs, a filter that sets your condition, and a formula that updates the dataset in a way that makes sense to achieve your goal.
To begin, after having an input and an output macro, click on the workflow tab and on the macro section, set it to an iterative macro.
Now set up a filter that checks the condition of the dataset and have one output be set to the true anchor ( this is the output that will only return all dataset once the condition it met) and on output set to the false anchor ( this is the output that will rerun the dataset ). Then have a formula that updates the dataset.
One the final step, go to the properties section in the interface designer, set interaction input to the input and have the iteration output set to your iterative output. This means all the dataset that did not fulfil the condition, having them repeat the process once again. Make sure to set a max amount of runs as well as having an error appear when max run is achieved.
And there you have it, a small guide on setting up an iterative marco. All that’s left is to save it and drop it in a workflow.
