Actions in Tableau are very important as they make the dashboard dynamic, interactive, and fun to use.
Actions in Tableau help users interact with the visualizations by selecting marks, hovering, or clicking a menu, and the actions that we set up can respond with navigation and changes in the view. Actions Apply to Tableau Cloud, Tableau Desktop, and Tableau Server. The Actions can be created into either sheets or dashboards. In this blog we will go through these Actions. There are five different actions in Tableau,They are:
Filter: Use the data from one view to filter data in another to help guided analysis.
Highlight: Highlights the marks of interest by coloring specific marks and dimming all others.
Go to URL: Creates hyperlinks to external resources, such as a web page, file, or another Tableau worksheet.
Go to Sheet: Navigate to other worksheets, dashboards, or stories.
Change Parameter: Users can change parameter values by directly interacting with marks on visualizations.
Change Set Values: Users can change the values in a set by directly interacting with marks on a visualization
.
How to Use Actions in Tableau
Open the Tableau Desktop and the ‘Connect to Data’ option from the data panel on the left side of the interface.
Once the data is loaded in the interface, create a new sheet for the Product Category Profit(PC_Profit) by dragging the Category and Profit to respective Column and Rows.
Create a new worksheet for Product Subcategory Profit(PSC_Profit) by dragging the Category, Subcategory, and Profit to respective Column and Rows.
Now we have two bar charts as shown below.
Filter Actions
Tableau action filters send information between worksheets. A filter action sends information from a selected mark to another sheet showing related information. The filter actions are used to trigger events in one sheet and see the results in the other. So, let’s see how to create a tableau filter action.
Go to Worksheet and select Actions and then select Filter from the Add Actions option.
Click Ok and the ‘Add Filter Action’ dialog box will appear. Here, we can select the source sheet as PC_Profit and the target sheet as PSC_Sheet along with select as the trigger on which we want to run our action. We can also choose Hover or Menu options to trigger the actions.
Now the filter action is set between the sheets PC_Profit and PSC_Profit. Here we have a filter action in which if we select the Furniture category in the source sheet then in the target sheet only the Subcategory under Furniture is displayed. Let's take a look into this.
URL Actions
A URL action is a hyperlink that points to a web page, file, or other web-based resource outside of Tableau. We can use URL actions to create an email or link to additional information about our data. To customize links based on our data, we can automatically enter field values as parameters in URLs.
These are the steps to create a Tableau URL Filter and apply it to the visualizations:
Go to the Worksheet>> Actions>> Add actions>> URL and click on OK.
Now We can see the Add URL Action dialog box where we can give the appropriate action name and select the source sheet(Statewise_Profit) and the URL of the webpage we want to open. Here I have given the Wikipedia Link followed by <state> which takes us to a webpage with the particular state which we select. We can see the Insert dropdown where we can insert the dimensions or measures from the table. Here I have taken State, which will give the details of the particular state we selected.
Select how to Run Action, There are 3 options, Hover, Select, and Menu to choose from.
Hover | Mouses over a mark in the view. This option works best for highlight actions within a dashboard. |
Select | Clicks a mark in the view. This option works well for all types of actions. |
Menu | Right-clicks a selected mark in the view, then clicks an option in a tooltip (menu). This option works particularly well for URL actions. |
We can see the hyperlink named Statewise Profit Action is created in the sheet Statewise_Profit, which keeps on changing the URL based on the State we click on.
An URL action run from a tooltip menu. The link reflects the action name.
Creating an email with a URL action
On a worksheet, select Worksheet > Actions.
In the Actions dialog box, click Add Action, and select Go to URL.
In the Source Sheets drop-down list, select the sheet that contains the field with the email addresses that we want to send.
In the URL box, We need to follow these steps:
Type mailto: and click the Insert menu at right to select the data field. Here I have selected a Customer Name to whom I need to send the email notification on product shipment.
Type ?subject= and enter text for the Subject line.
Type &body= and click the Insert menu at right to select the fields of information that we want to include in the body of the email. I have created a Calculated Field named EMail_Content with the below code and this is used to display the body of the mail.
("Hello "+STR([Customer Name])+",
Your product "+ " "+STR([Product Name])+" "+ " with the Order ID "+ " "+STR([Order ID])+" has shipped. Thanks for shopping with us!" )
Actions in Dashboards
Highlight actions allow users to highlight marks of interest by coloring specific marks and dimming all others.
Marks in the target sheet are highlighted when they match the marks selected in the source sheet.
Click on the Dashboard in the top menu and click on Actions.
In the Action window, click on Add action and then on the Highlight… option.
Select the source sheet (PC_Profit) and Target sheet(PCS_Profit) under Dashboard named Actions and Dashboards
We can see that in the dashboard below when the Category -Office Supplies in the West region is selected then the profit of the West region under the Subcategory is highlighted.
We have seen the Importance and how to use them in in Tableau. Hope this helps you all to understand Actions better. Happy Reading!