top of page
Search

How to handle filters while performing sheet swapping In Tableau, (2 Difference Data Sources).

  • Writer: Gowtham V
    Gowtham V
  • Feb 17, 2023
  • 2 min read

Scenario -

Consider we have 3 different years of sales data sources each of them are not related to one another. And we wanted to show their sales overview in one dashboard. Sheet swapping is the best solution to handle this in Tableau. But How do we enable the list of desired filters for user to play around. In this article I have come up with an best solution to handle this scenario.


Point to be noted -

We can union all of these three tables with same set of columns and create one data source. But it will create extra load on the server since it has to refresh past year sales data even though there were no new records getting added.

Step 1 - I have created a parameter and called it as Choose Your Year. It has the following values.

Data Type (String) - Values (2018, 2019).



Step 2 - As per the tableau rule, when we create a parameter it has to be used in the calculation to play around with the parameter values.

* Creating a calculation - Choose Your Year and add the parameter as it value.



Step 3 -Select the values (2018/2019) individually in the respective sheets in both the data sources and apply it (All Using This Data Source). The will enable us to filter for the selected parameter values.




Step 4 - In the dashboard create a horizontal layouts, drag and drop each sheets into it.


Step 5 - Now we have created a dashboard and placed parameter Choose Your Year at the top of the dashboard. This will be our main filter to switch around the views.


Step 6 - A show/hide button enables us to show both of the filters based on our need.


Step 7 - Steps to create Show/Hide button.


1: Drag a floating container on the dashboard.


2. Put a filter in the container (Can be multiple filters/worksheet).


3. Click on the little triangle drop down. chose 'Add Show/Hide Button'


(Hold ‘Alt’ and click on the button to show/hide the content when you are on tableau desktop, you don’t have to hold ‘Alt’ if the dashboard has been published on tableau public.)


4.

5. You can also personalize the button in the way you like.



You can view the above dashboard under my profile in tableau public site. I'm attaching the link here : (https://public.tableau.com/app/profile/gowtham.v5654/viz/SheetSwappingandHandlingDesiredFilters/ExecutiveDashboard)


The following video demonstrates how to use the dashboard.






 
 
 

Comments


bottom of page