actions

Upload: karthikre

Post on 11-Oct-2015

7 views

Category:

Documents


0 download

DESCRIPTION

vsvs

TRANSCRIPT

Advanced AnalysisNow that you understand the basics of building views in Tableau, become an advanced user by learning how to create custom calculations, use the built in statistics tools, leverage dynamic parameters, map data, and more.ActionsCalculationsForecastingParametersBackground ImagesBackground MapsTrend Lines and StatisticsLog AxesActionsTableau allows you to add context and interactivity to your data using actions. Link to web pages, files, and other Tableau worksheets directly from your analytical results. Use the data in one view to filter data in another as you create guided analytical stories. Finally, call attention to specific results using highlighting.For example, in a dashboard showing home sales by neighborhood you could use actions to help you quickly see relevant information for a selected neighborhood. Select a neighborhood in one view which then highlights the related houses in a map view, filters a list of the houses sold, and opens a webpage showing census data for the neighborhood.There are three kinds of actions in Tableau: Filter, Highlight, and URL actions.Filter ActionsHighlight ActionsURL ActionsRunning ActionsActions and DashboardsUsing Field and Filter Values in ActionsFilter ActionsFilter actions are a way to send information between worksheets. Typically a filter action is used to send information from a selected mark to another sheet showing related information. For example, when looking at a view showing the sales price of houses, you may want to be able to select a particular house and show all comparable houses in a different view. You could define a filter action to accomplish this task. First you need to decide what comparable means. In this case, say that comparable houses are houses with a similar sale price and square footage. A filter action to show comparable houses can be defined by selecting a destination worksheet and defining filters on sales price and square footage.Filter actions work by sending the data values of the relevant source fields as filters to the destination sheet. If you launch the filter action described in this example from a house that sold for $450,000, the destination sheet will have a filter to only show houses that sold for the same amount.1. On a worksheet, selectWorksheet>Actions. From a dashboard, selectDashboard>Actions.1. In the Actions dialog box, clickAdd Actionand then selectFilter.

1. In the subsequent dialog box specify a name for the Action.Use a name that defines the action. If you choose to run the action using the menu the name is the option that shows on the menu. For example, when sending housing information from one sheet to a map, the name could be Map all comparable houses sold in February You can use variables in the name that will be filled in based on the values of the selected field.

1. Use the drop-down list to select a source sheet or data source. When you select a data source or dashboard sheet you can further refine by selecting the individual sheets you want to launch the action from.

1. Then select how you want to launch the action. Select one of the following options:4. Hover- rest the pointer over a mark in the view to run the action. This option works well for highlight and filter actions within a dashboard.4. Select- click on a mark in the view to run the action. This option works well for all types of actions.4. Menu- right-click a selected mark in the view and then select an option on a the context menu. This option works well for filter and URL actions.

1. Use the second drop-down list to select a target sheet. When you select a dashboard sheet you can further refine the target by selecting one or more sheets within the dashboard.

1. Specify what to do when the select is cleared in the view. You can select from the following options:6. Leave the filter- leaves the filter on the target sheets. The target views in the dashboard will show the filtered results.6. Show all values- changes the filter to include all values.6. Exclude all values- changes the filter to exclude all values. This option is useful when you are building dashboards that only show some sheets if a value in another sheet is selected.1. Setup one or more filters to specify the data that you want to show on the target sheets. You can filter onAll Fieldsor define filters onSelected Fields.1. If you are defining filters for specific fields clickAdd Filter.

1. In the Add Filter dialog box select a source and target data sources and fields. When you run the action from a specific mark on the source sheet, a filter is added to the target sheet that only includes values for the target field that match the values of the source field. In the comparable houses sheet link example, the Source Field is Beds and the Target Field is Beds. That means when you launch the sheet link for a house that has 3 bedrooms, the destination worksheet will only show houses that also have 3 bedrooms.

1. When finished, clickOKthree times to close the dialog boxes and return to the view.If you are connected to a relational data source, youcan add sheet links across data sources even if the field names are not exactly the same. One data source may have a field titled Latitude while another has a Lat field. Using the drop down lists in this dialog box, you can associate the Latitude field to the Lat field.When using a multidimensional data source, the destination sheet must use the same data source as the source sheet. Moreover, the source field names must match the destination field names.The fields available in the Target Field drop-down list are dependent on what you selected as the Source Field. Only fields with the same data type as the source field can be selected as a destination field.Highlight ActionsHighlight actions allow you to call attention to marks of interest by coloring select marks and dimming all others. You can highlight marks in the view by selecting the marks you want to highlight, use the color legend to select related marks, or create an advanced highlight action.Selecting Marks to HighlightColor Legend HighlightingHighlight Toolbar ButtonCreating Advanced Highlight ActionsSelecting Marks to HighlightWhen you select a mark in the view all other marks are dimmed to draw attention to the selection. Selection is saved with the workbook and can be included when publishing. The simplest way to add highlighting to a view is to select the marks you want to highlight.You can select multiple marks by holding down the Ctrl key on your keyboard while you select each mark. You can also click and drag the pointer to select all marks in a specific area of the view.

Color Legend HighlightingColor legend highlighting is a powerful analytical mode for the color legend that allows you to focus on select members in the view. When you turn on color legend highlighting the marks associated with the selected items in the color legend are colored while all other marks are gray.For example, the views below show the relationship between order quantity and profit for several products. The view on the left uses the normal color legend, all marks are colored based on their shipping mode. The view on the right uses legend highlighting to call out the products that were delivered via Delivery Truck.Normal Color LegendColor Legend Highlighting Enabled

You can easily switch between legend highlighting and normal modes using the color legend card menu. Then, if you like how a view is highlighted, you can assign the highlight colors to the color palette. The old colors are replaced with the highlight colors.To turn on color legend highlighting:1. Click theHighlightbuttonat the top of the color legend or selectHighlight Selected Itemson the color legend card menu.

1. Select an item in the color legend.Once legend highlighting is turned on, you can quickly focus on specific data in the view by selecting different items in the color legend. When color legend highlighting is turned on a Highlight Action is created and can be modified in the Actions dialog box.To turn off color legend highlighting:1. Click theHighlightbuttonat the top of the color legend or selectHighlight Selected Itemson the color legend card menu.

When you turn color legend highlighting off the action is removed from the Actions dialog box.If you like how the view is highlighted and want to keep a specific member highlighted even when you turn off legend highlight mode, you can assign the highlight colors to the existing color palette. The original color legend is discarded and the highlight colors become the new color palette for the legend.To assign the highlight colors to the color palette, selectAssign Highlight Colors to Paletteon the color legend card menu.

Highlight Toolbar ButtonAnother way to add a highlight action is using the highlight button in the toolbar.Similar to the color legend highlighting, the toolbar button lets you highlight a collection of related marks in the view. To turn on highlighting, select the fields you want to use for highlighting on the toolbar menu. Then select a mark in the view to see the related data.

For example, the view below shows sales vs. profit by region. When a mark is selected, all other marks from that region that were shipped using the selected ship mode are highlighted. In this case you can quickly see all products from the Western region that were shipped via Delivery Truck.

The toolbar menu also lets you highlight on All fields or Dates & Times. All fields will consider all fields when determining matching records. Dates & Times considers all date and time fields.When you use the Highlight toolbar button an action is created in the Actions dialog box. You can modify the action to create more advanced highlighting behavior.Finally, you can use the toolbar button to disable highlighting across the entire workbook or for just the active sheet.

Creating Advanced Highlight ActionsYou can define more advanced highlight actions using the Actions dialog. There you can specify source and target sheets along and the fields you want to use for highlighting. Follow the steps below to create a Highlight Action.To create a highlight action:1. On a worksheet selectWorksheet>Actions. From a dashboard, select Dashboard >Actions.1. In the Actions dialog box click theAdd Actionbutton and then selectHighlight.

1. Give the action a name that will identify it in the Actions dialog. Try to make it descriptive. For example, Highlight Products Shipped by Delivery Truck. You can use variables in the name that will be filled in based on the values of the selected field.

1. Use the drop-down list to select the Source sheet or data source. If you select a data source or a dashboard sheet you can further select individual sheets within them.

1. Select how you want to launch the action. You can select from the following options:4. Hover- rest the pointer over a mark in the view to run the action. This option works well for highlight and filter actions within a dashboard.4. Select- click on a mark in the view to run the action. This option works well for all types of actions.4. Menu- right-click a selected mark in the view and then select an option on a the context menu. This option works well for filter and URL actions.

1. Select a Target sheet. If you select a dashboard you can further select individual sheets within the dashboard.

1. Select the fields you want to use for highlighting. Select from the following options:6. Selected Fields- marks in the target sheet are highlighted based on select fields. For example, highlighting using the Ship Mode field will result in an action that highlights all marks in the target sheet that have the same ship mode as the selected mark in the source sheet.6. Dates and Times- marks in the target sheet are highlighted when their date and time match those of the marks selected in the source sheet. All dates and time fields are considered when determining a match.6. All Fields- marks in the target sheet are highlighted when they match the marks selected in the source sheet. All fields are considered when determining a match.

1. When finished, clickOKtwice to close the dialog boxes and return to the view.URL ActionsA URL action is a hyperlink that points to a Web page, file, or other web-based resource outside of Tableau. You can use URL actions to link to more information about your data that may be hosted outside of your data source. To make the link relevant to your data, you can substitute field values of a selection into the URL as parameters.To add a hyperlink:1. On a worksheet, selectWorksheet>Actions. From a dashboard, selectDashboard>Actions.1. In the Actions dialog box, clickAdd Actionand then selectURL.

1. In the subsequent dialog box, specify a name for the link.Make the name descriptive of the action. If you choose to run the action using the menu, the name you specify here becomes the option that shows on the menu. For example, when linking to more product details, the name could be Show More Details. You can use variables in the name, which will be filled in based on the values of the selected field.

1. Use the drop-down list to select a source sheet or data source. If you select a data source or dashboard you can select individual sheets within it.

1. Select the fields you want to use for highlighting. Select from the following options:4. Hover- rest the pointer over a mark in the view to run the action. This option works well for highlight and filter actions within a dashboard.4. Select- click on a mark in the view to run the action. This option works well for all types of actions.4. Menu- right-click a selected mark in the view and then select an option on a the context menu. This option works well for filter and URL actions.

1. Specify the URL. You can use any URL that your browser can recognize including web pages, FTP resources, and files.Just as you can use variables in the name of the URL, you can also use field values and filter values as parameters in the URL. That means that you can send information about each selected mark or filter setting to a given website.In the URL you specify, include the appropriate prefix to ensure that the resulting hyperlink directs to the correct location. For example, if your URL links to a web page, include thehttp://prefix. If you publish workbooks to a Tableau Server, and your URL includes a protocol other thanhttp,https,gopher,news,ftp, ormailto, you will need a server administrator to add the protocol to the servers whitelist. For more information, seetabadmin set optionsin the Tableau Server help.1. (Optional) Select any of the following options:6. URL Encode Data Values- select this option if your data contains values that use characters that are not allowable in a URL. For example if one of your data values contains an ampersand, such as Sales & Finance, the ampersand must be translated into characters that your browser understands (URL encoded) if you want to include that value in the URL.6. Allow Multiple Values- select this option if you are linking to a webpage that can take lists of values as parameters in the link. For example, say you select several products in a view and you want to see each products details hosted on a webpage. If the server can load multiple product details based on a list of identifiers (product ID or product name), you could use multi-select to send the list of identifiers as parameters.When you allow multiple values you must also define the item delimiter, which is the character that separates each item in the list (often a comma). You must also define the Delimiter Escape, which is used if the delimiter character is used in a data value.

1. When finished, clickOKtwice to close the dialog boxes and return to the view.URL actions can also point to a web page object in a dashboard. Refer toActions and Dashboardsto learn more about how actions work with dashboards.Running ActionsDepending on how the action is created you can run an action using one of the following three methods:1. Hover- rest the pointer over a mark in the view to run the action. This option works well for highlight and filter actions within a dashboard.1. Select- click on a mark in the view to run the action. This option works well for all types of actions.1. Menu- right-click a selected mark in the view and then select an option on a the context menu. This option works well for filter and URL actions.HoverSelectMenu

Links are not always visible for every worksheet and mark. Because links are mapped to specific fields in the data source, links will only be available for the worksheets that use the mapped fields. For example, if you add a hyperlink that uses both Latitude and Longitude as parameters in the link, the link will only be available to worksheets that use Latitude and Longitude in the view. Additionally, the link is only available on marks and headers that contain relevant values.Actions and DashboardsActions often have special behavior when the source or destination is a dashboard. Filter and Highlight actions can affect other views in the dashboard and URL actions can update a webpage object so you dont have to open your web browser. Finally, you can create simple Filter and Highlight actions using special menu options so you dont have to open the Actions dialog box.Example: Filter Actions in a DashboardThis example shows how to create a filter action in a dashboard. The example shows a Real Estate dashboard with three views. Using theUse as Filteroption you can set one of the views to act as a filter on all the other views in the dashboard. In this case the scatter plot in the upper right is filtering the map view and the text table to show more details about the selected houses.

TheUse as Filtercommand can only apply to one view at a time. A filter action is created that you can modify in the Actions dialog box.Example: URL Actions in a DashboardThis example shows how a URL action works with a web page object in a dashboard. Below is a dashboard showing sales information by product for several stores in a coffee franchise. Included in the dashboard is a web page object that shows product details. The text table has a URL action that points at that web page. When you launch the action the web page automatically updates within the dashboard rather than opening a web browser.

Using Field and Filter Values in ActionsWhen you add an action in Tableau you often want to use values from your data as parameters in the name of the action as well as the action itself. Using fields as variables in the action name makes the menu item that launches the action specific to the selected mark. More commonly, using field and filter values as parameters in the URL of a URL action allows you to send information about a specific data point or filter setting to the destination webpage.Using Field and Filter Values in URLsUsing Field and Filter Values in Action NamesUsing Field and Filter Values in URLsTableau lets you add field, filter information, and parameter values as variables into URL actions so when you follow the link the values of those fields and filters are included. For example, when linking to an online mapping service, you can insert the address field into the URL so launching the link from a specific data point shows the address associated with that record on a map.1. In the Add URL Action dialog box, begin typing the URL for the link.1. Place the cursor where you want to insert a field, parameter, or filter value.1. Click the arrow to the right of the text box and select the field, parameter, or filter you want to add to the URL. The field, parameter, or filter name is added to the URL between angle brackets.You can continue adding field and filter values parameters as many times as you need to create the URL.

The list of available fields only includes non-aggregated fields. To use aggregated field values as a parameter in a link, you must first create a calculated field and then use the name of that field in the link. The calculated field must also be used in the view in order for the link to be available. A good way to use these fields is by placing them on the Level of Detail shelf.When inserting parameter values, the Display As value is what is sent with the URL action. To send the actual value instead, you should add the character~naafter the parameter name. For example, you may have a parameter that includes IP addresses. The Actual Value strings for the parameter include values such as 10.1.1.195 while the Display As strings include more friendly values such asComputer A(10.1.1.195). Inserting the parameter into the URL like this:http:///page.htmwill send the display values so the final destination URL would behttp://ComputerA (10.1.1.195)/page.htm. Obviously, that is not likely to create a valid URL. To send the actual value, the parameter in the URL should look like this:http:///page.htm.Using Field and Filter Values in Action NamesIn addition to using field, parameter, and filter values in URLs, you can use this information as variables in the action names. The name of the action displays on the context menu when an action is launched using the menu. Using field and filter variables in the name is useful in making the action specific to the selected mark. In a view showing real estate information, you could name a URL action that points at satellite images from an online mapping service, Show satellite image of . When you right-click on a specific mark, the tag is replaced with the location value associated with that mark.1. In the Add Action dialog box, begin typing the name for the action.1. Place the cursor where you want to insert the field or filter value.1. Click the arrow to the right of the text box and select the field or filter you want to add as a variable. The field or filter name is added between angle brackets.