Search results

Filtering Views through URL Parameters

Passing Parameter With URL

You can pass parameters to a dashboard by including them in a dashboard URL. Passing parameter values within URL will apply filter in the dashboard on initial load itself.

To set a dashboard parameter within a URL, use the following syntax:

parameter=value1, value2,…, valueN

where parameter represents the column name. Parameter can be single-valued and multiple-valued.

To append your query string made with parameters and values, to URL, add a prefix (?) to the query string. If (?) is already there in the URL,add a prefix(&) to the query string.

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?ProductName=Chang

Here is a dashboard view illustrating the same with single-valued parameter.

URLFilter Single Parameter Value

Here is a dashboard view illustrating the same with multi-valued parameter.

URLFilter Multiple Parameter Values

Supported Operators

You can also define parameters with operators to search for one or more values like below.

Operator Syntax
IN parameter=IN(value1, value2,..., valueN)
NOTIN parameter=NOTIN(value1, value2, …, valueN)
BETWEEN parameter=BETWEEN(value1, value2)
INBETWEEN parameter=INBETWEEN(value1, value2)
NOTBETWEEN parameter=NOTBETWEEN(value1, value2)
STARTSWITH parameter=STARTSWITH(value)
ENDSWITH parameter=ENDSWITH(value)
CONTAINS parameter=CONTAINS(value1, value2)

Date Parameters Support

You can define parameters (date and time typed columns) with date & time functions applied to search for formatted date values like below.

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?Year(OrderDate)=1996

Function Syntax
YEAR YEAR(parameter)=value1, value2, …, valueN
MONTHNAME MONTHNAME(parameter)=value1, value2, …, valueN
QUARTER QUARTER(parameter)=value1, value2, …, valueN
QUARTERYEAR QUARTERYEAR(parameter)=value1, value2, …, valueN
MONTHYEAR MONTHYEAR(parameter)=value1, value2, …, valueN
DAYMONTHYEAR DAYMONTHYEAR(parameter)=value1, value2, …, valueN
MONTHDAYYEAR MONTHDAYYEAR(parameter)=value1, value2, …, valueN
HOURS HOURS(parameter)=value1, value2, …, valueN
MINUTES MINUTES(parameter)=value1, value2, …, valueN
DAY DAY(parameter)=value1, value2, …, valueN
SECONDS SECONDS(parameter)=value1, value2, …, valueN
DATEHOUR DATEHOUR(parameter)=value1, value2, …, valueN
DAYOFWEEK DAYOFWEEK(parameter)=value1, value2, …, valueN
WEEKOFYEAR WEEKOFYEAR(parameter)=value1, value2, …, valueN

List of operators supported in date time functions. For example purpose we are using year date time function.

Function Syntax
IN YEAR(parameter)=IN(value1, value2, …, valueN)
NOTIN YEAR(parameter)=NOTIN(value1, value2, …, valueN)
BETWEEN parameter=BETWEEN(value1,value2)
INBETWEEN parameter=INBETWEEN(value1,value2)

NOTE: Do consider that for between and inbetween operators, the value must be in given format M/d/yyyy h:mm tt, and also no date time function is required for the same

Here is a dashboard view illustrating the use of parameter with date & time function.

URLFilter Date Value

Measure Parameters Support

You can define parameters with measure typed columns just as shown below

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?MeasureTypeParameter=value

For measure you can following operators to the value.

Function Syntax
BETWEEN parameter=BETWEEN(value1, value2)
NOTBETWEEN parameter=NOTBETWEEN(value1, value2)
IN parameter=IN(value1, value2, ..., valueN)
NOTIN parameter=NOTIN(value1, value2, ..., valueN)

Besides these operators, you can apply following conditions for measure parameters.

Condition
parameter!=value
parameter<value
parameter>value
parameter<=value
parameter>=value

Comma separator is used in the condition to filter with the multiple values for the measure column like parameter=value1,value2,value3,...,valueN.

NOTE: Do note that you are only allowed to pass one parameter value , except for between and notbetween which needs 2 parameter values.

Here is a dashboard view illustrating the use of parameter with measure parameter values.

URLFilter Measure Value

URLFilter Parameter Value

Dimension Parameters Support

You can also pass Dimension type parameter values to filter.

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?DimensionTypeParameter=value

For measure you can only use following operators to the value.

Function Syntax
IN parameter=IN(value1, value2, …, valueN)
NOTIN parameter=NOTIN(value1, value2, …, valueN)
STARTSWITH parameter=STARTSWITH(value)
ENDSWITH parameter=ENDSWITH(value)
CONTAINS parameter=CONTAINS(value)

Here is a dashboard view illustrating the use of parameter with measure parameter values.

URLFilter Dimension Value

Passing Parameters with dataSource

You can pass parameter value along with datasource name to specifically filter the same. For that purpose you can pass the Url like given below.

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?DataSourceName.ParameterName=value

Here is a dashboard view illustrating the use of parameter with datasource.

URLFilter Data source

Where Northwind is the required data source name.

Passing Multiple Parameters With URL

You can pass more than one parameter within a URL introducing an ampersand (&) symbol in between them to differentiate like below.

http://<servername>/<culturename>/dashboards/<dashboardid>/<category>/<dashboardname>?Year(OrderDate)=1996&Country=Germany

Here is a dashboard view illustrating the same.

Two Different Parameter

NOTE: Points to be considered

  • 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.