Alteryx Designer Desktop Discussions

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

Automatically process workflow with filter to output a sheet with every possible option

George221
5 - Atom

I have a workflow which involves a filter based on a column with a discrete number of options (~16). I would like to process the workflow so that rather than manually change the filter and re-run the workflow, I can just run the workflow once and have the output be a file with 16 tabs, labelled by each option in the filter.

 

I feel like in theory this should be a pretty simple process, but I've struggled to find a solution online / leverage the macro tools appropriately. Key callout, this is a rather complex workflow that I'd rather not start from scratch / optimize in any way beyond simply having this one filter "cycle". Thanks!

5 REPLIES 5
griffinwelsh
12 - Quasar

You can use a batch macro to accomplish this. Use your filters as the control parameter and feed in the data. Sample is attached

DataNath
17 - Castor
17 - Castor

Hey @George221, you can just add an Output Data tool as normal, configure this however you wish and then for the bottom option of 'Take File/Table Name From Field', select 'Change File/Table Name' and choose your filtering field in the dropdown - this will then create a sheet for each distinct value within this field, split out and named as such. You can also untick 'Keep Field in Output' if this is just a filtering field that isn't necessary in your Excel file. Also in option 3 - Output Options - ensure you're not using 'Overwrite File (Remove)' or the file will continue to be overwritten each time and you'll just be left with one sheet (the final one). See below:

 

split_tabs1.pngsplit_tabs2.png

George221
5 - Atom

I understand this in theory (and knew there must be a macro method), but not in practice. Any YouTube tutorials you'd recommend just to jumpstart my thinking? Any I've watched have been pretty unhelpful.

George221
5 - Atom

This would work if the filter wasn't already part of a fairly complicated workflow - I can't exclude the filter to do what you'd suggest. I think a simple macro solution is essentially all that's needed, but I have no idea how to functionally accomplish that. Feel like documentation / tutorials for Alteryx I've found in general have been pretty user-unfriendly / hard to understand.

griffinwelsh
12 - Quasar

@George221 Did you look at the batch macro I posted? You just need to feed in your data and feed in a unique list of filters to get your desired output. I recommend this tutorial for batch macros https://www.youtube.com/watch?v=NNH_K5U5r78

Learn all about Batch Macros in Alteryx with Molly Hatch Links ---------------------------- - Macro file at https://til.bi/MollysBatchMacro - https://www.thedataschool.co.uk/marc-reid/creating-batch-macro-alteryx - https://www.thedataschool.co.uk/rachel-phang/batch-macros-alteryx - ...
Labels
Top Solution Authors