KNOWLEDGE BASE

Passing URL Filters to Tableau Server View That Uses a Cube Data Source


Published: 09 Oct 2013
Last Modified Date: 01 Sep 2016

Question

How to pass URL parameter filters to a Tableau Server view that uses a cube data source.

Environment

Tableau Server

Answer

MSAS data sources

URL parameters can be used with MSAS data sources, but the syntax will vary with the level of detail and with the type of field being filtered. 

http://<your_tableau_server>/views/<workbook_name>/<worksheet_name>?<hierarchy>=<hierarchy>.<value>

  • When using a hierarchy, use the following syntax:
 
  • For example, using a hierarchy of [Orders].[Customers].[Region], enter the following to tell the cube the exact hierarchy level on either side of the equal sign:

    http://<your_tableau_server>/views/<workbook_name>/<worksheet_name>?[Orders].[Customers].[Region]=[Orders].[Customers].East

  • When using attributes, the syntax is the same as that for hierarchies. For example, to filter on the attribute [Orders].[CustomerSegment], use the following format:

    http://<your_tableau_server>/views/<workbook_name>/<worksheet_name>?[Orders].[CustomerSegment].[CustomerSegment]=[Orders].[CustomerSegment].Corporate

  • Calculated members can be passed more directly, similar to filters for relational data sources. If the attribute in the example above was in a calculated member named [_combined biz], the syntax would be: 

    http://<your_tableau_server>/views/<workbook_name>/<worksheet_name>?[Orders].[CustomerSegment].[CustomerSegment]=[_combined biz]

Oracle Essbase cube data sources

  • Reference each generation level as a separate filter parameter in the URL. For example:

http://<server_name>/views/<workbook_name>/<view_name>?[Product].[Generations].[Gen2,Product]=Colas&[Product].[Generations].[Gen3,Product]=Cola

  • Enclose filter values which contain spaces in square brackets:

https://<server_name>/views/<workbook_name>/<view_name>?[Product].[Generations].[Gen2,Product]=[Root Beer]&[Product].[Generations].[Gen3,Product]=Sasparilla

Note:
  • Aliases cannot be used in the filter
  • Replace + with %2B
  • If "LogicException: Internal Error" is received after adding the URL parameters, typically this means that the syntax is incorrect. Verify the structure of the URL parameter string based on the above notes.
  • The right side of the equal must exactly match the hierarchy structure of the data source. There are instances where the remote name (the reference to the right of the equals) will not match the specific location of the member to be filtered. This can be seen by reviewing the query generated in the logs when using the member as a filter. 
Did this article resolve the issue?