Batch Macros in Alteryx

What is a macro?

A macro is a tool you can use in Alteryx that allows you to save a set of premade steps that you can add to your workflow at any time. There are different kinds of macros that can be used for different kinds of data and analyses.

What is a batch macro?

In a batch macro, the data is grouped by something, and the macro is repeated for every group.

Data can be sent in batches or all at once, with the workflow repeating based on your grouping.

When might I use a batch macro?

  • If you have multiple files that you want to combine, but they all have different formatting, you might use a batch macro to to standardize their formatting in a single process.
  • If you need to isolate a certain section of characters in a field, but they don’t all have the same amount of characters, you could group them by the number of characters and run a batch macro instead of making multiple workflows.
  • If different categories of entries in a field need different processes applied to them. 

To test your knowledge, let's do a quick quiz about batch macros (Answers at the bottom of the page if you scroll!)

  1. Is each group of records processed independently or dependently?
  2. Your manager is requesting a list of all of their employees, current and past, in a single table. While going through the files, you see that in the files from 3 years ago, employee records called employees by “Last Name, First Name,” even though the current system uses “First Name, Last Name.” You continue looking, and see that 5 years ago, the files used “Last Name, F.” To properly combine these files, you need to standardize the formatting of employee names. Is this a scenario where using a batch macro is your best option?
  3. Your manager wants you to create a field for running company profits. When a row shows a negative profit, he wants you to add a “+“ next to the value, and when it’s positive, he wants you to add a “-”. Is this a scenario where using a batch macro is your best option?
  4. You’ve been given some scraped web data from one of your company’s competitors and asked to clean it before it’s analyzed by the marketing department. However, they are only requesting data from the past year, and nothing before then. Is this a scenario where using a batch macro is your best option?
  5. Match the number to the letter!
      1. Uses conditions to determine which row gets which process applied to it.
      2. Uses conditions to determine how many times a process is applied.
    1. Batch
    2. Iterative

Stop scrolling when you see this text if you would like to conceal the answers.

Answers

  1. Independently! The macro is run against the unique conditions of each group.
  2. Yes! In this scenario, you can group the records by year and apply different adjustments to the name fields based on their grouping.
  3. No, use a standard macro.
  4. No. Instead of grouping by year, you should use an iterative macro, and set it to run until the year changes. 
  5. 1 = A, 2 = B
Author:
Helena Reichenvater
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2026 The Information Lab