Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Loop in filter

deepakshaw1991
7 - Meteor

Hi Friends,

I need an urgent help regarding loop in filtering. For some reason I am unable to attach the input file but I am sharing what I exactly need.

 

deepakshaw1991_0-1754328242584.png

 

The above screenshot is the output of the filter loop process done manually. There is a big data set from which this is filtered out. Suppose "ID" is the column where we need to put the filter and "Final ID" is the value column where we get the number which we need to filter in column "ID".

 

For example, I need to start my filter from "312787". Now when we filter this in the "ID" column we get the "Final ID" as "312788" again we have to filter this "312788 in the "ID" column and this process needs to be repeated till there is no match in the "ID" column or the "Final ID" column is blank.

 

In the screenshot we have started filtering from the bottom and in the second row we get "Final ID" as "1" then we filter it in the "ID column and we can see not the new "Final ID" in row 1 is blank, which means now the loop is complete and there is no more entry to filter in the "ID" column.

 

If anyone can share me a workflow which can do this loop filtering, It will really be helpful.

4 REPLIES 4
Gaurav_Dhama_
12 - Quasar

Try using multi row formula instead, this sounds like a problem for multi row formula than batch macro.

Qiu
21 - Polaris
21 - Polaris

@deepakshaw1991 
I dont quite understand that the column "Final ID" is your desired result or only as input?

Can you share the data (paste the data here if can not attach file) of Input and desired output?

KGT
13 - Pulsar

Building a sample to show this method would be hard without data, but what you are after is an iterative macro, where you will pass an ID in, that will get a row from the table, put that row to output, and grab the new ID from that row, and pass to the I output.

 

So, something like this: (this is not a working example, as it doesn't have data in it).

Screenshot 2025-08-05 101343.png

Raj
16 - Nebula

@deepakshaw1991 can you please explain the requirement in detail, as it is difficult to understand the clear requirement
Or add the final result expected with input

Labels
Top Solution Authors