For this example, the data source used is Sample – Superstore data.

Creating the tableau dashboard below is broken down in to 4 main steps:

1 Creating the source sheet

2 Create the target sheet

3 Create dashboard and assign set

4 Add dashboard actions

(click on the image below to go to the example workbook)

1 Creating the source sheet

For the source sheet, Top 5 Sub-Categories by Sales has been considered.

  • Drop Sub-Category on Rows
  • Drop Sales in Columns
  • Filter top 5 Sub-Categories by Sum of Sales
  • Add Sum of Sales to Labels and left align
  • Order the Sub-Category by descending Sum of Sales

2 Create the target sheet

Open a new sheet, monthly profit ratio for the Top 5 Sub-Categories by Sales has been considered.

  • Apply the same filter which is in the source sheet (Top 5 Sub-Categories by Sales)
  • Drop Order date on Columns and select Continuous Month
  • Drop Profit ratio on rows (only one line will be seen at this moment)
  • Next, drop Sub-Categories on Detail (now we see multiple lines, same as the below image)

3 Create dashboard and assign set

  • Open a new Dashboard and drop both the sheets
  • Right click on any of the bars from source file and select Create Set ( I have named the set Top 5 Subcategory by Sales)

  • To link the target sheet to the Set, go back to the sheet and drop the set in colour.
  • Also, change the subcategory in Detail shelf from Dimension to Attribute

  • Create a new Calculated field to create dynamic label for the lines (I named it ‘Sub Category Label’). Formula reads, “IF [Top 5 Subcategory by Sales] then [Sub-Category] else “Other” END”
  • Drop this new field on to Label, and Profit ratio on to label.

4 Add dashboard actions

If we go back to the Dashboard, we will notice the updates on the target sheet. However, there is no interactivity yet. So, to add a dashboard action, go to dashboard and select Actions.

Next, select on Add Action and Change Set Values.

  • On the new pop up window, edit the name of the action (I named it ‘Subcategory Action’).
  • Select the source sheet as the dashboard we are currently on and only check the source sheet (‘Sum of Sales’)
  • Run action selected is ‘Select’
  • Target Set is our main Data source and select our set we have created previously (‘Top 5 Subcategory by Sales’)
  • Also selected is ‘Keep set values’ under ‘Clearing the selection will:’