KNOWLEDGE BASE

Unable to Pass Multiple Values in an Action from a Single Mark


Published: 25 Oct 2016
Last Modified Date: 25 Jun 2018

Issue

When a view is filtered by a more granular dimension, and that dimension is not included in the view, then an Action will not pass the filter values of the more granular dimension.

For example, the source view may be something like a bar chart by segment, and the target worksheet could be a details crosstab listing each customer. After filtering the bar chart to a smaller group of customers, the user clicks a segment bar to trigger the Filter Action, but the target worksheet is only filtered by segment and not by the list of selected customers.

Environment

  • Tableau Desktop
  • Filter Actions
  • URL Actions

Resolution

CLICK TO EXPAND STEPS
Option 1: Filter Actions
For Filter Actions, it is possible to create a view where the end user clicks the header to pass multiple dimension member values. The attached example workbook uses the sample data set Superstore to demonstrate the following directions:

Step 1: Create the source Sheet
  1. Select Analysis > Create Calculated Field
  2. In the Calculated Field dialog box that opens, do the following, and then click OK: and Name the calculated field. In this example, the calculated field is named "Click Here".
    • In the formula field, create a calculation similar to the following:
    • "Click this text to navigate to 'Target Sheet' >"
  3. Drag [Click Here] to the Rows shelf.
  4. Drag [Customer Name] to Detail on the Marks card.
  5. In the dropdown on the Marks card, select Polygon.
  6. Navigate to Format > Borders…
  7. In the left-hand Format Borders pane, under Row Divider, for Pane, select None and close the Format Borders pane.
  8. Navigate to Analysis > Table Layout > uncheck Show Field Labels for Rows.
Step 2: Create the dashboard
  1. Drag "Sheet 1" and "Source Sheet (filter)" onto a dashboard.
  2. Right-click the Customer Name filter and select Apply to Worksheets > Selected Worksheets…
  3. In the Apply Filter to Worksheets dialog, check Source Sheet and click OK.
  4. Navigate to Dashboard > Actions…
  5. In the Actions dialog click Add Action > Filter…
  6. In the Add Filter Action dialog, do the following:
    • For Source Sheets, check only Source Sheet (filter).
    • For Run action on, choose Select.
  7. In the dropdown menu under Target Sheets, select Target Sheet (filter).
  8. Click OK in each open dialog to close them
CLICK TO EXPAND STEPS
Option 2: URL Actions
For URL Actions, it is possible to send a table calculation that creates a comma separate list of values, which will then be used to filter the published view. The attached example workbook uses the sample data set Superstore to demonstrate the following directions:

Step 1: Create the source Sheet
  1. Select Analysis > Create Calculated Field
  2. In the Calculated Field dialog box that opens, do the following, and then click OK:
    1. Name the calculated field. In this example, the calculated field is named "Click Here"
    2. In the formula field, create a calculation similar to the following: "Navigate to published target sheet"
  3. Drag [Click Here] to the Rows shelf
  4. Drag [Customer Name] to Detail
  5. Create a calculated field with a name like "Feeder Calc" with a calculation similar to the following:
    IF FIRST()= 0
    THEN MIN([Customer Name])
    ELSEIF MIN([Customer Name]) != LOOKUP( MIN([Customer Name]), -1 )
    THEN PREVIOUS_VALUE("") + "," + MIN([Customer Name])
    ELSE PREVIOUS_VALUE("")
    END
  • Create a calculated field with a name similar to "Value to Send in URL Action" with a calculation similar to the following:
    IF LAST() = 0
    THEN [Feeder Calc]
    END
    
  • Drag [Value to Send in URL Action] to the Rows shelf
  • Right-click [Value to Send in URL Action] on the Rows shelf and select Compute Using > Customer Name
  • Right-click [Value to Send in URL Action] on the Rows shelf and uncheck Show Header
  • Navigate to Format > Borders…
  • In the left-hand Format Borders pane, under Column Divider, for Pane, select None and close the Format Borders pane
  • Navigate to Analysis > Table Layout > uncheck Show Field Labels for Rows
Step 2: Create the dashboard
  1. Drag "Sheet 2" and "Source Sheet (url)" onto a dashboard
  2. Right-click the Customer Name filter and select Apply to Worksheets > Selected Worksheets…
  3. In the Apply Filter to Worksheets dialog, check Source Sheet and click OK
  4. Navigate to Dashboard > Actions…
  5. In the Actions dialog click Add Action > URL…
  6. In the Add Filter Action dialog, do the following:
    1. For Source Sheets, check only Source Sheet (url)
    2. For Run action on, choose Select
    3. For the URL, enter something like: {URL of published view}?Customer Name=<AGG(Value to Send in URL Action)>
  7. Click OK in each open dialog to close them

Cause

The ability to pass filter values through an Action, or to assign multiple dimension member values to a single Mark in the view is not yet built into Tableau Desktop.

Additional Information

URL Actions will not be triggered when clicking a header. Thus the above workaround will not work for URL Actions.
Did this article resolve the issue?