How do I filter on a list?

ColumbiaColumbia Member Posts: 5 Contributor II
edited April 2020 in Help

I have taken all the dividend-paying stocks and used k-means to assign them to clusters.  Now I would like to use a list of my personal stocks to see which clusters my stocks are in. I see a  filter operator to filter a single selection like on cluster_4 but I want to filter on a LIST no a single variable.

In SQL it would look like this:

Select * where StockSym in {XOM, PRU, CVX, SPG …..} 

Is there an operator I can use to filter based on my list?


Best Answer

  • Options
    rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member, University Professor Posts: 568 Unicorn
    Solution Accepted
    Yes, it's actually called Filter Examples.

    Since you are trying to do a SELECT with an OR, on the bottom left corner of the Filter Examples configuration you can select "any" of these, not "all".

    If by any chance you have an actual list as an example set, you can use a "Join", and make it an "Inner" join.


  • Options
    ColumbiaColumbia Member Posts: 5 Contributor II
    Thank you.  The second suggestion did the trick.  I joined my stock list with the cluster output to get the results I wanted.
Sign In or Register to comment.