1 Reply Latest reply on Apr 26, 2018 9:41 PM by Shinichiro Murakami

    Filter but keep all "similar" records

    Daniel Adorno

      Hi All - tried to find a similar thread but had no luck.  I'm trying to filter a data set like I have in my example below, so that if you were to filter on "SPORT", all records (Cities) that contain at least one like from B are kept.   So for example...

       

      Data:

       

      Row; Ctiy;  Sport

      1; Chicago; Hockey

      2; Chicago; Baseball

      3; Chicago; Basketball

      4; Boston; Baseball

      5; Boston; Racing

      6; Miami; Hockey

      7; Miami; Baseball

       

      Example, if i have a 'Multiple Dropdown' filter on SPORT and select only "Hockey", then rows 1,2,3,6 and 7 would still show.  Rows 4 and 5 would be filtered out since "Boston" doesn't have hockey listed.  If in my 'Multiple Dropdown' filter I choose "Hockey" AND "Baseball" then NO filter would be applied, since all cities have at least ONE of those 2 sports.

       

      In SQL I'd be using a DISTINCT in some fashion to accomplish this, but can't figure out how to do this in Tableau.   I'm trying to avoid having to use joins since with the project data I have, I can have the equivalent of up to 50 unique "sports" and 500k+ rows of data, and don't want to duplicate the information.   Any help would be greatly appreciated.  Thank you in advance for any help!