Recently, one of my client requested a dashboard where it is possible to Compare one Year with the Other.
The requirement – if you have two charts, user should be able to perform comparison between two Years such as 2012 vs 2014.
I achieved this by creating a copy of the datasource in Tableau desktop.
Creating a copy of the data source in Tableau
1. Launch Tableau desktop and connect to the excel data source provided by Tableau, Sample – Superstore. Connect to Orders table.
This will create a datasource called Orders (Sample – Superstore).
2. Right click on the Orders (Sample – Superstore) and select Duplicate. This will create a copy of the datasource
3. Now using each datasource, you can create separate visualizations with Year filter . This will be done by creating two separate sheets. In Tableau, one sheet can contain one visualization.
From the menu, navigate to Worksheet and select New Worksheet
New worksheet can also be created from the bottom status bar, by clicking on the new sheet icon.
4. Create visualization using separate datasources created above. Place Region on Columns shelf and Sales on Rows. Place Region on the Color to get the colored bar. Create a Quick filter for Year on each chart.
5. To display these visualizations on the same view, create a Dashboard. To create a new dashboard, navigate to menu/Dashboard and select New Dashboard.
New dashboard can also be created from the bottom status bar, by clicking on the new Dashboard icon.
On the dashboard, from the list of sheets on the left, double click on the sheets to include them on the same view.