Hello,
i have a main dataset and need to keep only a big list of variables from another input and filter out the rest. below is an example but the real dataset has much more variables so i cannot use a filter function.
Variables to keep |
bread |
milk |
eggs |
Main dataset: need to keep only the above but in a dynamic way for over 50 variables.
code | product |
a | milk |
b | water |
c | flour |
d | eggs |
e | tomato |
f | apple |
g | bread |
Solved! Go to Solution.
Hi @Sammy22
You can do this with use of Join tool. Here is how you can do it.
Workflow:
Hope this helps : )
but if i have multiple of the same products in the main dataset will this create duplicates? I can have for example over 10 eggs, milk and bread.
hi @Sammy22 ,
I recommend you to use Find Replace tool.
You can create list of Variable you want to keep as Text Input and "filter" for these values.
Regards,
Karolina
Hi @Sammy22
You have a point but wouldnt variable to keep list will have unique occurrences. That way it wont cause duplicates. You can do something like below. Find and replace method suggested by @KarolinaRoza would be another method you can use 🙂.
Hope this helps : )