Last Modified Date: 29 Nov 2023
Environment
Tableau DesktopAnswer
The ability to build a Venn Diagram is not currently built in Tableau Desktop.- To voice your support for the inclusion of this feature in a future product release, add your vote to the following Community Idea: Groupings / Venn diagram.
- While the below workaround can be reproduced with sample data, please note that the steps may not be suitable for data structured in a different or specific way.
- The following workaround can be reviewed in the attached workbook Venn Diagram and Explanation.twbx and in the video below.
CLICK TO EXPAND STEPS
Step 1. Create the Sets
- Right-click on Container and select Create Set....
- Select "Jumbo Drum" and name the set Jumbo Drum.
- Repeat these steps for "Jumbo Box".
CLICK TO EXPAND STEPS
Step 2. Create a combined set of "Jumbo Box and Jumbo Drum"
- Right-click on Customer and select Create Set....
- Select the Condition tab and enter in the formula bar:
SUM(IF [Container]="Jumbo Drum" THEN 1 END) >0 AND SUM(IF [Container]="Jumbo Box" THEN 1 END) >0
CLICK TO EXPAND STEPS
Step 3. Create calculated fields
- Navigate to Analysis > Create Calculated field.
- Name the field "Outer Venn Position".
- Enter the formula:
COUNTD(IF [Jumbo Box] THEN [Customer] END)
- Navigate to Analysis > Create Calculated field.
- Name the field "Overlapping Position".
- Enter the formula:
[Outer Venn Position]/2
- Create a Calculated field and name it "Drum and Box Customers".
- Enter the formula:
COUNTD(IF [Jumbo Box and Jumbo Drum]=TRUE THEN [Customer] END)
CLICK TO EXPAND STEPS
Step 4. Create the view
- Drag Number of Records to the Rows Shelf; change the aggregation to Minimum.
- Drag Outer Venn Position to the Columns Shelf.
- Drag Overlapping Position to the Columns Shelf.
- Right-click on Overlapping Position and select Dual Axis.
- Right-click on the Overlapping Position axis in the view and select Edit Axis > untick "Include zero" > OK.
- On the marks card for All measures: drag Container to Color
- In the color Container, select Jumbo Drum and Jumbo Box (hold CTRL while clicking on both) and select Keep only.
- Right-click and drag Customer to Size and select CNTD(Customer)
- Right-click and drag Customer to Label and select CNTD(Customer)
- On the marks card for Overlapping Position: change mark type to Text
- Remove Container from Color
- Remove CNTD(Customer) from Size
- Remove CNTD(Customer) from Text.
- Drag "Drum and Box Customers" to Text
- On the marks card for Outer Venn Position (please note that you may need to set the resolution of the view to fit as: Standard)
- Change the mark type to Circle
- Change the color transparency to (75%) and add a black border
- Increase the Size of the marks to maximum and downsize the Outer Venn Position axis until circles are overlapping. (to 275)
- "275" on the axis is specific to this Superstore example. More information can be found in this community thread.
- Right-click on the fields in the columns and rows shelves and clear the selection of Show Header
- Click on Format, select Lines, and remove Grid and Zero lines; select the Borders icon and turn off row and column dividers for pane.
- Optional: On the Overlapping Position marks card, increase the text size and change the text color to black.
Note: the video has no sound.
Additional Information
For more information about Venn Diagrams workarounds, see the following links from Interworks:Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials