Tableau How To Create a Basket Analysis Chart

Published: 02 Aug 2023
Last Modified Date: 03 Aug 2023


  • Tableau Desktop


This example is using the Sample Superstore data available with Tableau Desktop.  Follow along with the sample packaged workbook available in the Attachments section to the right of this text.

1.  On the Data Source page, drag Orders to the campus.

2. Drag Orders to the campus again. The second Orders will be displayed as Orders1.
User-added image

3. For "Select matching fields to create this relationship", select Order ID for Orders and Order ID (Orders1) for Orders1, leave the Operator as =
User-added image

4. On a new worksheet, drag Sub-Category to Columns and Sub-Category (Orders1) to Rows

5. Drag Order ID to Text and right-click on it, then select Measure > Count (Distinct)

6. Drag Order ID to Color and right-click on it, then select Measure > Count (Distinct)

7. Change Mark type to Square

8. Create a calculation field called filter with the following formula:
ATTR([Sub-Category (Orders1)])>=ATTR([Sub-Category])

9. Add the calculation filter to Filters and select True

User-added image
Did this article resolve the issue?