Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Loop through multiple conditions


Hi Guys,


I am trying to filter a data set based on multiple conditions. This is how the data looks likeCapture.PNG



I have 3 conditions:


1. If customer ID = 1 AND Order $ is multiple of 5 and less or equal to 40

2. If customer ID = 2 AND Order $ is multiple of 5 and less or equal to 60

3. If customer ID = 4 AND Order $ is 7 or -7



I know I can create 3 branches using filter tool. But I will have more conditions in the future (around 100) I don't wanna have 200 filter tools in my workflow.


Is there a way to filter the data condition by condition (use as less tools as possible) and put all data that meet requirements into one table?


Any thoughts will be appreciated.

You can do this using a Batch macro to evaluate each condition as a formula against the input data.




I've attached a sample workflow to get you started.

ACE Emeritus
ACE Emeritus

Does this help at all?


@thizviz aka cbridges, Bolide

Thanks ThizViz. Now I know how to solve the multiple problem. But I also want to know how to loop through conditions. Appreciate your help


Thank you so much. Is it possible to put all the conditions in an Excel file and let Alteryx look up the values in the Excel to change the formula?

Yes perfectly possible.

The conditions are specified in the text input. If you replace this with an input tool reading from excel it should work.

You will need to write the expressions as valid Alteryx formulae (have a look in the text input tool for some examples).

Thank you for your help.