Report parameters are used to customize a data query depending on the user-entered values. Common uses of parameters:
Also parameters are needed if you want to enable data filtering for published reports.
Note: interactive features for published reports (including inputs for parameters) are available only for accounts with advanced publishing subscription.
All possible report parameters should be declared in the Cube Configuration form:
Each parameter should have an unique name; with this name you can use actual parameter value in datasource-specific query or in expression of another parameter. For more details about parameters usage in dataset query see help page for concrete data source.
It is possible to specify which UI editor to use for the parameter:
Dropdown with dynamically-populated items list. Items may be loaded from some dimension of the parameter's cube or any other cube.
Technically data is loaded with internal pivot-table like report query that contains specified dimension(s). This guarantees only unique items in the dropdown. Another consequence is that this query result is cached for a short time like any other pivot table data.Notice for reports that are embedded in a secure way: all report parameters that are passed in JWT payload may be used in dropdown-dynamic queries.
How end-user can enter report parameters:
In some cases you might need to modify parameter value before passing it to the query, and this is possible with Expression option. The syntax of this expression is the same as for calculated cube members. Typical usages:
%for 'like' comparison:
Parameter["dropdown_param"] == "preset1" ? "1" : null
Dimensions.Contains("date_day") ? 1 : nullIn the Select Query:
Measures.Contains("SumOfHours") ? 1 : nullIn the Select Query:
@contains_hours[LEFT JOIN table_with_hour ON (...)]
Important: in parameter's expression you may use parameter values that are passed to the report with
Parameter["param_name"]. Note that if specified parameter has own Expression you'll get an original parameter value and not a calculation result.