Skip to main content

How View URLs Are Structured

How View URLs Are Structured

The parameter names and values are case-sensitive.
The operators and date & time function names are case-insensitive.
Characters like comma (,) and ampersand (&) in value should be prefixed and suffixed with tilde (~) symbol to differentiate itself from syntax elements.For example, CompanyName=Syncfusion Inc~,~
Invalid parameter name will get ignored from filter consideration.
Invalid parameter value will result in “No data available to display” in widgets.
  Structure of the base URL
  • In Tableau Server or Tableau Online, the basic URL pattern for a Tableau view is:
    http://<servername>/#/views/<workbook>/<sheet>
  • In a multi-site environment, for views saved to sites other than Default, the site ID is also included in the URL:
    http://<servername>/#/site/<sitename>/views/<workbook>/<sheet>

Adding parameters to the base URL

To create a filtering URL, you append a query string to the base URL. In a query string, the view filters are the parameters. To construct a query string:
  • Begin the query string with a question mark (?).
  • Separate the parameters using ampersands (&).
  • Separate multiple values per parameter using commas (,).
For example:
http://<servername>/#/views/<workbook>/sheet?param1=value1,value2&param2=value
In addition, any characters in your field or sheet names that cannot appear in URLs are URL encoded. For example, a space is converted to %20.
Note: Before you add URL parameters, remove :iid=[#] at the end of the URL. This is a temporary view counter for your current browser session.

Select an example view to work with

The examples in this article use the Performance view, in the Superstore sample data that comes with Tableau Server.
The example URL reflects the following attributes:
  • The sheet name is Performance
  • The workbook name is Superstore
  • The server name is indicated using a placeholder IP address, where your on-premise server name or online.tableau.com would appear.
To follow along with the examples, you can look at a similar view from Superstore, or you can adjust the example URLs to use the field, sheet, and other names from your own environment. If you are using your own view, make sure you publish it to the server.

Filter the view

For the example view used in this article, the base URL is:
http:<servername>/#/views/Superstore/Performance

Furniture only

To display only sales of furniture, at the end of the URL, add the following query string:
?Category=Furniture
For example:
http:<servername>/#/views/Superstore/Performance?Category=Furniture

Consumer only

To limit the view to Consumer sales, change the URL to:
http:<servername>/#/views/Superstore/Performance?Segment=Consumer

Home Office and Consumer

To show both home office and consumer sales, change the URL to:
http:<servername>/#/views/Superstore/Performance?Segment=Home%20Office,Consumer

Notice that in the field name "Home Office," %20 represents the URL-encoded space character, as described in Adding parameters to the base URL.
Here multiple values per parameter are separated with a comma, but not a space.

Furniture in the Central

To show multiple field/value pairs, separate them with an ampersand:
http:<servername>/#/views/Superstore/Performance?Region=Central&Category=Furniture

Exclusive filtering

So far, the examples shown in this article display all values for the fields in the resulting views. For more flexibility, you can specify multiple values for a specific filter, and include an additional parameter that displays only particular intersections of those values.

The following URL describes the base, unfiltered view used in this example, showing department sales by region:


http://<servername>/#/views/Superstore/Performance

Next, to show sales for only the Furniture and Technology departments in the Central and West regions, you would add the following query string to the base URL:

?Region=Central,West&Category=Furniture,Technology

To show only Furniture sales in the Central region and Technology sales in the West region, add the ~s0 parameter to the query string:

?Region~s0=Central,West&Category~s0=Furniture,Technology

The final URL looks like this:
http://<servername>/#/views/Superstore/Performance?Region~s0=Central,West&Category~s0=Furniture,Technology

Special considerations for date filtering


When you want to filter date fields, take into account how dates are formatted and behave in a database environment.
  • Date (and time) values passed via URL parameter need to match the following Tableau default format:
    yyyy-mm-dd hh:mm:ss
  • Many databases store dates as datetime values, so you may need to include a time part in the value you provide in the parameter. The time part is based on a 24 hour clock, so 10:18 pm is specified as 22:18:00.

Example date parameters

The following example query strings use a date field called Order Date. As in the previous examples in this article, you would add these to the base URL of your view.
  • If the Order Date field type includes only the date (with no time of day), and you want to show data only for July 8, 2018, the query string would look something like this:
    ?Order%20Date=2018-07-08
  • If Order Date includes the time part, to filter on July 8, 2018 at 10:18 pm, the query string might look like this:
    ?Order%20Date=2018-07-08%2022:18:00
  • If Order Date is only the date, and you want to filter on multiple dates, you would use commas, as described earlier in this article. For example:
    ?Order%20Date=2018-07-08,2018-07-09,2018-07-10,2018-07-11

Parameters as DATEPART filters

To filter by date part, use the same nomenclature as in the default Tableau Desktop date hierarchy. 
year(Order%20Date)Integer
quarter(Order%20Date)Integer between 1 and 4
month(Order%20Date)Integer between 1 and 12
day(Order%20Date)Integer between 1 and 31
hour(Order%20Date)Integer 0–23
minute(Order%20Date)Integer 0-59
second(Order%20Date)Integer 0-59
week(Order%20Date)Integer 1-53
my(Order%20Date)Six-digit integer: YYYYMM
mdy(Order%20Date)Eight-digit integer: YYYYMMDD

Comments

Popular Posts

Add Space between bars in Tableau chart

Add Space between bars in Tableau chart Scenario: Tableau defaults to no spacing between the panes in a view. How do I get some spacing between groups of bars in my charts? It can be achieved through the steps below: Add subtotals (Analysis->Totals->Add All Subtotals) Right click on the measure pill on the Rows shelf and change the default SUM() aggregations to MIN() To edit the color legend – double click on the Total color, this takes you to a color dialog, select the WHITE color, click OK Right click on the word Total in the X axis and select Format In the Format window, click the Header tab and blank out the Total label field The added space looks like below:

Adding “Apply” Button to A Filter Menu In Tableau

Adding An “Apply” Changes Button To A Filter Menu In Tableau Sometimes when a user is changing the options they want on a filter in Tableau, the chart updates as they change each option. This might not be the best user experience if they are changing many options and don’t want the dashboard to redraw the view until they have completed their selection. It is very simple to fix this – Tableau includes an “apply” changes option, which when enabled, means the dashboard won’t redraw to reflect the new filter choices until the user presses the “apply” button. Simply click the drop down arrow on the filter menu > go to “customize”, then click “show apply button”.  

Error "Cannot mix aggregate and non-aggregate arguments with this function"

Error "Cannot mix aggregate and non-aggregate arguments with this function" When Creating a Calculated Field When creating a calculation, the following error might occur:  "Cannot mix aggregate and non-aggregate arguments with this function." The issue can be resolved through one of the below options: Modify the calculation so that all fields are either aggregate or non-aggregate. Each option can result in different values (please reference the additional information section for specific examples). Option 1 (Aggregate Then Divide) Wrap all fields in an aggregation. Sample: [Profit] / SUM ([Sales]) -> SUM ([Profit]) / SUM ([Sales]) Option 2 ( Divide Then Aggregate) Remove aggregations from all of the fields. Sample: [Profit] / SUM ([Sales]) ->[Profit] / [Sales]   Option 3 ( Condition Then Aggregate) Move the aggregation so all fields are aggregated. For example, the calculation: IF [Row ID] = 1 THEN SUM( [Sales] ) END  could...

Removing "Abc" Placeholder Text in Tableau Measures column

Removing "Abc" Placeholder Text in Tableau Measures column Quick and easy fix for this issue could be: Use Polygon mark type On the Marks card in the dropdown menu, select Polygon Resize the last column to make it smaller Navigate to Format > Borders In the left-hand Format Border Pane, for Column Divider, For Pane, select None from the dropdown menu Navigate to Format > Shading In the left-hand Format Border Shading, for Row Banding, move the slider to the desired level of row banding

Tableau Bar Chart Rounded corners

Tableau Bar Chart Rounded corners Follow the steps in the video below to create rounded corners for the bar chart:

Using Special Characters in Tableau URL Parameters

Using Special Characters in Tableau URL Parameters When we try to use special characters in URL parameters, the URL parameter might not do anything, or an error might occur. The issue can be resolve by:  Use one of the following workarounds: Replace the special character with the URL encoding sequence for backslash (\) (%5c) followed by the URL encoding sequence for the special character. The backslash is needed to escape the special character. For example, the URL encoding sequence for backslash and comma (\,) is %5c%2c.  In the data source, separate comma-delimited field values into separate columns that can be filtered independently. In Tableau Desktop, use a calculated field to replace the special characters, such as commas or spaces, with hyphens (-). Cause The browser cannot parse the special characters used in the URL. Additional Information The error varies depending on the browser and special character being used. Networ...

Cannot mix aggregate and non-aggregate arguments with this function

Cannot mix aggregate and non-aggregate arguments with this function Issue When creating a calculation, one of the following errors might occur:    "Cannot mix aggregate and non-aggregate arguments with this function." (Option 1,2,3 or 4 can be used). " All fields must be aggregate or constant when using table calculation functions or fields from multiple data sources." (Option 1 or 3 can be used). "Argument to sum (an aggregate function) is already an aggregation, and cannot be further aggregated ."  (Option 2, 3 or 4 can be used). Environment Tableau Desktop Resolution Each option can result in different values (please reference the attached workbook in the right-hand pane and additional information section for specific examples). Option 1 (Aggregate All Fields) Wrap all fields in an aggregation. Sample: [Profit] / SUM ([Sales]) -> SUM ([Profit]) / SUM ([Sales])   Option 2 ( De-aggregate All Fields) Remove aggregations from all of ...

Set a Date Filter Default to Max Date in Tableau

Set a Date Filter Default to Max Date in Tableau Some of us might have not noticed the setting a   filter to default to the Max date. There is a quick and simple option to achieve this in Tableau filters. Follow the steps below: 1. Create a date filter with the date dimension. 3. Drag the date dimension to filters pane. 4. Edit the date filter to Select from the list and select the max date available. 2.    Now, y ou have the option  'Filter to latest date value when workbook is opened', check this box and click on OK.

Tableau Extract Update Error "Timeout Error: IPC_NamedPipe::Select(WaitForMultipleObjects)

Tableau Extract Update Error "Timeout Error: IPC_NamedPipe::Select(WaitForMultipleObjects) When trying to update the Data Source or w hen attempting to connect to a data source, or create and/or refresh extracts with Tableau Desktop, the following error message occurs:  IPC_NamedPipe::Select(WaitForMultipleObjects): Timeout. Cause Anti-virus software is blocking Tableau processes from running, or the Logs folder contained corrupted information.  Resolution Option 1: If it is easy w ork with IT helpdesk/support to add below Tableau folders and processes to exclusions : Tableau.exe hyperd.exe hyperdstarter.exe *.hyper extension (if AntiVirus has an option for extension exclusions) C:\Users\<username>\Documents\My Tableau Repository C:\Users\<username>\AppData\Local\Temp\TableauTemp C:\Users\<username>\AppData\Local\Tableau C:\Program Files\Tableau Make sure that child folders are included in the exclusions. AntiVirus prog...