KNOWLEDGE BASE

How to Switch Between Pie Charts Using the Sheet Selector in The Same Area of The Dashboard


Published: 11 Mar 2022
Last Modified Date: 30 Oct 2023

Question

How to switch between pie charts using the Sheet Selector in same area of the dashboard.
Default

User-added image
Desired
 When selecting Sales.
User-added image
 When selecting Profit.
User-added image

Environment

  • Tableau Desktop

Answer

If you already have created the pie chart, created the sheet selector, and added it to the dashboard, skip to Step 4.

Step 1

Creating Pie Charts
1. Open Tableau Desktop and connect to Sample -superstore.
2. Drag [Sales] to Rows and Region to Columns.
3. Click on Show me and select Pie chart.
4. Change the sheet name to "Sales"
5. Create a new sheet.
6. Move to the new sheet and drag [Profit] to Rows and Region to Columns.
7. Click on Show me and select Pie chart.
8. Change the sheet name to "Profit"

Step 2

Creating the Sheet Selector
9. Create a new parameter like the following.
User-added image
10. Create a new calculated field like the following.
     Name : Sheet Filter
     Calculation : [Select the sheet]
11. In "Sales" sheet , right click [Select the sheet] and click Show Parameter.
12. Drag [Sheet Filter] to Filter Pane, check Custom value list, and add "Sales".
User-added image
13. Move to the sheet "Profit", right click [Select the sheet] and click Show Parameter.
14. Change the value of the parameter to "Profit".
15. Drag [Sheet Filter] to Filter Pane, check Custom value list, and add "Profit".
User-added image

Step 3

Adding to Dashboard
16. Create a new Dashboard.
17. Select "Floating" and drag and drop "Vertical Object" to view.
User-added image
18. Drag sheet Sales while pressing Shift button to the vertical object added in step 17.
19. Set sheet title to hidden.
20. Drag sheet -Sales while pressing Shift button to the vertical object added in step 17.
      *Drop in the following gray area.
User-added image
21. Set sheet title to hidden.
22. Change Fit of the two seats to Entire View.
 *The two pie chart locations would be separated into top and bottom.
User-added image 

Step 4

Main Question
23. Move to Sheet -Sales > Set Parameter to Sales.
24. Create a new calculated field like the following.
     Name : Calculation 1
     Calculation : 1
25. Right click on [Calculation 1] > Convert to Discrete.
26. Drag [Calculation 1] to Rows > Right click on it > Show Header
27. Move to Sheet -Profit > Set Parameter to Profit.
28. Drag [Calculation 1] to Rows > Right click on it > Show Header

Move to Dashboard.
You will see that the pie chart switches in one area.
*When selecting Sales.
User-added image
*When selecting Profit.
User-added image


 
Did this article resolve the issue?