This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!
Even after years of using Alteryx I still seem to somehow avoid using iterative macros when I realize later they are such a great option in my tool chest. What are different ways you have applied using iterative macros in your work? The Supply/Demand examples are well used and variations of it exist and the Collatz Conjecture example is great for learning. Any others?
'Paging' through API calls is perhaps the best example for iterative macro's.
Take the Twitter API for instance; you can only download a maximum of 200 followers for an individual at one time. If that user has more than 200 followers then you have to take a 'next page' indicator within the initial response and loop this back round.
If you take a look at the twitter macros we have developed then you can see what I mean in more detail. Examples below.
https://gallery.alteryx.com/#!app/Get-Twitter-Followers/5a44cf13f499c70fb0b98f2c
Another great example is by a couple of colleagues of mine which uses an iterative macro to assign and create equitable trade areas. A video highlighting the usecase can be found here: https://www.theinformationlab.co.uk/2017/05/30/re-drawing-borders-using-alteryx-map-equitable-sales-...
Ben
Thanks @BenMoss such a great example! I hadn't seen the trade areas one before, so good. Anybody else have good examples for usage of iterative macros?
I have a workflow that brings in a directory of 30 Excel files, iterates through the files to get the filenames and worksheet names in the first step - then it does a second iteration to bring in the data from ONE of the Excel Worksheets from each file to then push to a Snowflake database
The biggest issue is that since they are shared Excel workbooks the users constantly create duplicate files (when the files get locked) or add columns to the files (like if they feel the need to throw a pivot in the workbook) or just generally change things they shouldn't :)