1 Reply Latest reply on Aug 14, 2018 5:19 AM by Mahfooj Khan

    How to get unique values from a single column and set it as a filter?

    Thiraj Silva

      Hi Team,


      I have a requirement to get the product distribution based on zones.

      The issue I have is regarding the product column (It is stored in a similar way to a market basket)


      Customer                         Products

      A                                        a,b,d

      B                                        b

      C                                        c,d

      D                                        a,b,c,d,e






      I want to get all the UNIQUE (there are 16 in this case) products from the products column and set it up as a filter. So when ever I select a particular product from a filter, all the relevant customer details (zones in this case) THAT CONTAIN THAT PARTICULAR PRODUCT should be displayed.

      How can this be done?


      All help is appreciated,

      Thank you in advance

        • 1. Re: How to get unique values from a single column and set it as a filter?
          Mahfooj Khan



          I don't know the structure and the actual source of the data

          However find my approach below

          Option 1:

          Once you connected the data use Custom spli to get the values in several fields/columns like this

          Once done you'll get something like this

          then copy the whole data and paste it in excel and delete the Product field

          then you'll have only

          Now connect this new source in tableau and select splited fields and use pivot option to get the values (Split 1-5) from columns to rows.

          Once done you'll get this view. You can put data source filter to hide the null values.

          Post hiding null you will have this data. Rename the Pivot Field Values to Products

          Now go to worksheet and drag the fields like this


          Option 2:


          You can create a parameter with all the product values like this

          Now use this parameter to create a calculated field to get the distinct count of Customers


          Only problem with parameter is single selection. Let us know if any of these helps.

          workbook attached for your reference.



          1 of 1 people found this helpful