Parameters
Parameters are an advanced feature that allows users to build lists of items that can be used to drive other calculations or logic. Parameters can be either:
- 'static' - hard coded items simply typed into the system. This includes text or numbers.
- 'dynamic' - derived values from data models found in the system. This is usually a list of hierarchy elements or members.
By using a parameter, the designer can make a visual element pop-up in the UI of the application, allowing the consumer to make a runtime selection, which in turn will change the logic or behavior of a calculation or report.
Where Parameters are Used
Parameters can be used in:
- Queries built in Discover
- Custom calculations built in Formula
- Custom sets built in List (for example, to build multi-hierarchy cascading slicers)
- Variable lists
- Presentations and publications
Parameter Types
There are two main options for building parameters:
- Global Parameter: may be used across different servers and data models.
- Model Parameter: can be used only on a single specified data model.
Review the PQL documentation to learn about PQL functions and building PQL formulations.
Note: Parameters are not the same as 'external parameters' that can be used to change URL-loaded or embedded content from external inputs. However, they are related.
Parameters vs Slicers
Most dynamic parameters are visualized as a slicer but they can be used to inject dynamic elements into ANY PART of the target query (as opposed to only filtering the query like a regular slicer). Indeed, slicers are a simplistic quick implementation of parameters. This allows users to change complex logic built in queries at runtime, without the need to design any complex artifacts on the server or on the client. Parameters may be used to configure other custom formulations, like custom lists and members, in order to create sophisticated logic. For more on slicers, click here.
Example
The query in the image below shows sales by product; however, Product is being injected into the query via the parameter buttons (red highlight). The parameter has been configured to inject the 10, 15, or 30 top selling elements.