Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Use all values in a column to filter items

Cherub7210
7 - Meteor

Is there a macro where i can use a column in a file to filter all values in another file?

 

Example: i have this column in my file A and will use that to filter all the values in file B that has the doc listed 

 

Doc Id
1
2
3
4
5
6
3 REPLIES 3
cpet13
11 - Bolide

@Cherub7210 what you could do is use a simple join tool. Use an input tool for each document (so you'd have 2 input tools) then join them together on DocID and only take records in the J anchor, meaning only those records that are in both files.

OTrieger
12 - Quasar

@Cherub7210 

I guess @cpet13  gave you the easiest way to do it, there are multiple other ways to get it done:
If you will create a list from file A, meaning concatenating the items and then appending it to the File B, you can filter the data base on this list, or you can do it with a batch macro.

I like to go a simple as possible and would go with the Join tool.

cpet13
11 - Bolide

@Cherub7210 if the DocID in the second file that you want to filter by the first has the DocID mixed with other information, it would add a little bit more. You could then use a RegEx tool to parse out the DocID and get it into its own column, then use that in the join.

Labels