1 Reply Latest reply on Nov 13, 2017 1:39 PM by Jonathan Drummey Branched from an earlier discussion.

    Re: Is it possible to re-use an exclude filter as an include filter in another sheet?

    Sucheta Kakade

      Hi

      I have gone through the all post, but not able to get solution for our requirement.

      Our requirement is:

      We need to show co purchased  Product items with respect to selected Product Item in filter/sets.

      In  a workbook I have listed all 'Product items', 'number of target Baskets'(here no of unique transactions), '% of target baskets'

      now not able to apply filter as per requirement. can anyone help?

       

      For eg. this is a simple example, what I want exactly similar to this

      If there are four products p1,p2,p3,p4 and p1 is selected in filter, then we want to show other copurchased items with p1 in all transactions where p1 is purchased, that is p2,p3,p4 and their no of Target Baskets(no of transactions) and % of target basket over all transactions.

      For ex. In  a first basket there are 3 products p1,p2,p3

                  In second basket there are 4 products p1,p4,p3,p5

                  In third basket there are 2 products p1,p5

                  In fourth basket there are 2 products p1, p5,,p6

      and in set / filter p1 is selected, then i want to show all other products sold along with product p1 sorting by their quntity

      that is, here

      Product Name              No of Target baskets                    % of Target baskets

      p2                                            1                                                25%

      p3                                            2                                                50%

      p4                                            1                                                25%

      p5                                            3                                                75%

      p6                                            1                                                25%

       

      How i should use 'exclude' here or is there any other way?

       

      I have attached workbook with My data

        • 1. Re: Is it possible to re-use an exclude filter as an include filter in another sheet?
          Jonathan Drummey

          Hi Sucheta,

           

          See the attached for one solution. A more precise description of the issue here is that the goal is to select a given product and then see all related products for that transaction, then for each of those related products get a distinct count of the number of transactions and % of total transactions those belonged to. Tableau offers a few ways to select a single thing:

           

          Quick filters on regular dimensions - these reduce the entire data set to only the selection

          Filter Actions - which act on dimensions as regular quick filters

          Quick filters on table calc dimensions - these are late filters applied after calculations

          Parameters - these are fixed lists of values from which a single value could be selected.

           

          One could use a parameter to get the selection, but that's not dynamic and since there are 187 different transaction items in your (filtered) sample data, I'm guessing maintaining a filter list would be undesirable. An alternative that I blogged about is at Creating a Dynamic “Parameter” with a Tableau Data Blend | Drawing with Numbers. In this case, a duplicated connection to the data source is used with a filter on the secondary transactionItems_name, while the data blend is only on the transactionID dimension. This causes Tableau to only return the transactions for the selected item, then the measures can work as-is. I added an additional Non-selected Item filter to remove the chosen item from the view. Note that Tableau data blends are after aggregation and performed inside Tableau, so depending on your data source there can be performance limitations.

           

          Jonathan