Loading

Tableau: How to Avoid Enumerating All Values When Passing "(All)" in a URL Action Using <FILTERVALUES(Field Name)>

게시 일자: Jun 23, 2026
전제 조건
Tableau Desktop, Tableau Cloud or Tableau Server Web Authoring
과업

Minimize URL length and avoid errors when passing "(All)" in a URL action

When using <FILTERVALUES()> in a dashboard URL action, selecting "(All)" in a filter causes Tableau to append every single dimension member to the URL string. This can result in a URL that exceeds the length limits of web servers or browsers, frequently leading to the following error:

400 Bad Request

For more technical details regarding this error, please refer to the following article: 400 Error Code Returned When Passing Very Long Filter Values in the URL.

To resolve this, we can dynamically pass a blank value when all items are selected, as Tableau treats an empty parameter as a selection of all values.

단계

Mechanism Overview

This workaround uses a combination of Level of Detail (LOD) expressions to detect if the filter is in the "(All)" state and table calculations to concatenate specific selections into a comma-separated string. By passing an empty string when all values are selected, we leverage Tableau's behavior where a parameter without a value (e.g., ?Field=) is treated as an "All" selection, thereby keeping the URL short and avoiding "400 Bad Request" errors.

Step 1: Create the required calculated fields

Create the following four calculations. In this example, we use [Sub-Category] as the target field.

  • [Sub-Category List] (Used to concatenate values):
    IF FIRST() == 0 THEN ATTR([Sub-Category]) 
    ELSE PREVIOUS_VALUE("") + "," + ATTR([Sub-Category]) 
    END
  • [Sub-Category for URL parameter] (Determines whether to show the list or a blank string):
    IF MIN({ FIXED : COUNTD([Sub-Category]) }) = MIN({ EXCLUDE [Sub-Category] : COUNTD([Sub-Category]) }) 
    THEN "" 
    ELSE [Sub-Category List] 
    END
  • [Filter the Last One] (Identifies the row with the full concatenated list):
    LAST() == 0
  • [Click Here] (Label for the action button):
    "Click Here"

Step 2: Build the button worksheet

  1. Drag [Sub-Category], [Sub-Category List], and [Sub-Category for URL parameter] to the Rows shelf in that order.
  2. Right-click each of the three pills on the Rows shelf and clear Show Header to hide the table structure.
  3. Drag [Click Here] to the Text mark.
  4. Right-click [Sub-Category List] and [Sub-Category for URL parameter] on the Rows shelf, and select Compute Using > Sub-Category.
  5. Drag [Filter the Last One] to the Filters shelf and select True.

Step 3: Build the Dashboard and apply the filter

  1. Add your main worksheet and the "Click Here" button worksheet created in Step 2 to the dashboard.
  2. Display the [Sub-Category] filter on the dashboard.
  3. Apply the [Sub-Category] filter to both the main worksheet and the "Click Here" button worksheet.

Step 4: Set up the Dashboard URL Action

  1. Navigate to Dashboard > Actions > Add Action > Go to URL.
  2. Select the "Click Here" worksheet as the source.
  3. Configure the URL including the parameter at the end:
    http://server_name/t/site_name/views/sampleworkbook/ToDashboard?Sub-Category=<AGG(Sub-Category for URL parameter)>
    Note: In the URL above, replace server_name and site_name with values appropriate for your environment. The <AGG(Sub-Category for URL parameter)> portion at the end is syntax automatically generated by Tableau and does not need to be modified.

Step 5: Verification Steps

A sample workbook Sample Workbook.twbx is attached to this article for reference.

  1. Navigate to the dashboard of the workbook you just created, or download and open the attached Sample Workbook.twbx in Tableau Desktop.
  2. Navigate to Dashboard > Actions, select Hyperlink1, and click Edit.
  3. Update the URL to point to a valid view on your specific Tableau Server or Tableau Cloud environment.
  4. Publish the workbook to your server to test the live behavior.
  5. Verify the results in the published dashboard:
    • Scenario A (Specific Items): Select multiple values in the [Sub-Category] filter and click the "Click Here" button. The URL should list those specific values.
    • Scenario B (All Items): Select "(All)" in the filter and click "Click Here." The URL parameter should appear as Sub-Category= (blank), and the target view should correctly display all members.
Knowledge 기사 번호

005316602

첨부 파일

Sample Workbook.twbx

446 KB

 
로드 중
Salesforce Help | Article