Batch macro - multiple filters / control parameters
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Relatively new to alteryx and need some help to resolve this urgently. I have large dataset in a single sheet that I will need to split into smaller files using 4 different filters (in columns). I have created a batch macro that worked with the first filter - which pulled out all the data based on the location code. For some of these locations, I will need to apply another filter for the cost center. Questions below:
1. Is the macro workflow below for the second filter correct? How do I go about applying a formula to skip this step if the input field is blank?
2. In the main workflow, how do I change the expression for both control parameters in the in Text input list to include both columns to flow into the macro?
Please any help on the above is greatly appreciated!
Thank you
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mis994
When you have multiple Control Parameter you will need to ensure that all the data for these parameters is available. When clicking on the macro you will need to Questions, and then you can set each Control Parameter. Select the first field for the first parameter and etc. So that is how you can set all your fields as parameters for the macro.
In the 2nd Filter Tool you can use a Custom and then write a conditional formula or add several conditions to fit your need.
You can connect the Control Parameter directly to a Q and not need to use Action Tool, it makes it easer as you will need only to select that input, nevertheless using Action Tool is totally fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mis994
Is not using Batch Macro an option also?
We can use the Feature in the Output Data tool as below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi both,
Thank you for your answers. @Qiu yes, I do not need to use Batch macros, so any easier way should work. Under the Feature in Output Data - how do I add more filter fields and is there an easy formula to put in so that if [plnt] is null, then skip the filter?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mis994
Than you for the update.
Can you share your input file as well? and also desired sample output?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Qiu,
Please see attached file - input on first tab and two example outputs.
Thanks!
