7 Replies Latest reply on Aug 17, 2017 8:34 AM by Yuriy Fal

    Market Basket

    Bill Windle

      So how do I select a value in place of a Parameter for Market Basket Analysis based on clicking the value from a sheet. 

       

      So on Dashboard 1   I want to be able to update Sheet 2 by clicking on the item in Sheet 1 not from Parameter 1.  I have been unable to make this work.  Thanks for the help. 

       

        • 1. Re: Market Basket
          Okechukwu Ossai

          Hi Bill,

           

          You can do this using an action filter.

           

          Step 1: Duplicate the Item field to create [Item (copy)]

           

          Step 2: Create calculated field [Then Order Also Contains v2]

          [Item (copy)]

           

          Step 3: Create the chart like shown in Sheet 3. At this stage, the filter shelf will be empty.

           

          Step 4: Create a dashboard. Go to Dashboard - Actions - Add Action - Filter

           

           

           

           

          Step 5: Go to Sheet 3, right click on the action filter in the filter shelf and Edit Filter, then check Exclude box.

           

           

           

           

          Hope this helps.

          Ossai

          • 2. Re: Market Basket
            Bill Windle

            This is the direction I was thinking with using actions but the issue here is the results are incorrect.  So if I select gloves the most the other values can be is 3.  So for the item selected it should show the other items that are associated with that item and the number of times they were used.  If you look at my screen shot the item was hat and the total of coat and gloves was 2.  Thoughts? 

            • 3. Re: Market Basket
              Yuriy Fal

              Hi friends,

               

              I'd like to add some to the above

              (very nice, Ossai, btw).

               

              The aim is to send the [Order ID] values

              along with the [Item] exclusion --

              but in a distinct Filter Action.

              It is the combination of the two

              that would give the correct result.

               

              Please find the attached.

               

              Yours,

              Yuri

               

              PS  To make everything work as expected,

              one should select the [Item] Headers

              on the Source (not the [Item] Marks).

              • 4. Re: Market Basket
                Bill Windle

                I think this works but it is inefficient.  It has been running for 14 min on my full data set.  Other ideas?  The Parameter version takes 3 sec to run for comparison. 

                • 5. Re: Market Basket
                  Bill Windle

                  Is there a way for the select action to pass the value selected into an equation that has the parameter replaced?  So I select hats and instead of  this equation IF [Item] = [Parameter 1] THEN 1 END  it would be something like this one IF [Item] = [Selected item] THEN 1 END

                  • 6. Re: Market Basket
                    Yuriy Fal

                    Hi Bill,

                     

                    Agree, having [Order ID] in Details is a performance hit.

                     

                    The other obvious way is via a self-join on [Order ID],

                    filtering the same [Item] rows on the extract/datasource,

                    then using [Item] from the left side as a Filter on the Target

                    while using [Item] from the right side as a Dim on a Target view.

                     

                    Please find the attached.

                     

                    Yours,

                    Yuri

                     

                    PS  The join performance of the underlying DBMS could be a limitation.

                    Making an extract (or even better joining the extract onto itself) could help.

                    2 of 2 people found this helpful
                    • 7. Re: Market Basket
                      Yuriy Fal

                      Unfortunately, Tableau-generated Sets

                      (including those by Filter Actions)

                      cannot be referenced in calculations.