Concepts → Presentation variable
A presentation variable is a type of dashboard filter.
A dashboard developer defines zero or more presentation variables for a given dashboard. Like a prompt, the definition of a presentation variable overrides the default behavior of dashboard which is to coalesce a list of dimension columns from all insights on all tabs as filterable columns available in the Filter and Search controls of the Filter bar. Once defined and configured, a presentation variable appears as a filterable column in the Filter dialog and as a filter bar pill.
Often, a dashboard developer references a presentation variable as filter value in a filter expression or a part of formula in a formula expression.
As a referenceable and mutable object that exists within the scope of a given dashboard, a presentation variable often functions as a a value that a dashboard consumer can assign a new value to. A dashboard consumer can assign a new value to presentation variable in the Filter dialog. Unlike a session variable, the new value immediately accessible to the dashboard itself. This means that any affected formula expressions or filter expressions will immediately be recalculated and reapplied.
A dashboard developer with Edit access rights to a dashboard can create and edit one or more presentation variables. Here’s how:
- In the Action bar of a dashboard, select More Options (⋮ vertical ellipsis icon).
- In the More Options menu, select Manage Filter & Prompts.
- In Dashboard Filters, select Presentation Variables.
- From the Data panel, drag & drop a column or formula to the applied filter tray.
Because a presentation variable is a mutable and referenceable object, a dashboard developer can utilize a presentation variable in a variety of ways:
as a filter value in the filter expression of a dashboard filter or as any part of a formula that is a filter expression of a dashboard filter
- an applied filter
- a filter option
as a filter value in the filter expression of an insight on a dashboard or as any part of a formula that is a filter expression of an insight on a dashboard
- an individual filter
- an aggregated filter
- a measure filter
as any part of a formula expression for a formula pill in an insight on a dashboard for
- a grouping dimension
- a coloring dimension
- a measure
There are some unsupported uses of a presentation variable which may result in an error or unexpected behavior:
- as part of a formula expression for a formula column in a physical schema table or materialized view
- as part of a formula expression for a formula column in a runtime business view
- as part of a formula expression for a formula pill in a Incorta View or Incorta Table
- as part of the expression in a filter expression session variable
- as part of an internal query expression for an internal session variable
- as a default value for a global variable
- as filter value for an individual filter, aggregated filter, or measure filter for an Incorta View or Incorta Table
- as default filter value for a prompt
The following are the properties of a presentation variable
|Display Name||text box||Required. Enter the display name for the presentation variable. This name will appear as the name as a filterable column in the Filter dialog and as the filter bar pill name.|
|Variable||text box||Required. This is the variable name.|
|Data Type||drop down list||Required. Set the data type for the variable as string, double, long, integer, or date.|
|Default Value||text box||Required. Enter a default value for the variable. This can be system variable, internal session variable, or external session variables.|
|Default Value → Variable||checkbox||Optional. Only available for variables that are a date system variable, internal session variable, or external session variable.|
|Field (Optional)||tray and pill||Optional. Drag and drop a column from the Data panel to the tray. The pill populates the available values that appear in the Values pane of the Filter dialog for the presentation variable.|
As a dashboard developer, it is important to understand that a presentation variable has a data type and default value. It is possible to define a default value using another variable. Similarly, it also possible specify as variable as an assigned value for a presentation variable in the filter dialog.
All three types of session variables store values as a string. If a presentation variable is not of the type string, do not use a session variable for a default value or as an assigned value of a presentation variable.
The following table describes the supported variable and data types for a the value of presentation variable.
|Variable type||Presentation variable
|Date system variable||date||✔||✔|
|External session variable||string||✔||✔|
|Filter expression session variable||string||✔||✔|
|Internal session variable||string||✔||✔|
|Miscellaneous system variable||string||✔|
Although it may be possible to specify a presentation variable or a global variable as a default value or as an assigned value of a presentation variable, this configuration is not supported and may produce unexpected results.
A schema developer and dashboard developer may implement the unsupported usage of a presentation variable in a formula column for a runtime business view. The practice consists of the following steps:
- First, create an internal session variable with a specific name such as
- Create a formula column in a business schema view or Incorta view with a formula expression that references the internal session variable. AS a valid expression for the Formula Builder, this expression will pass formula validation.
- Save the changes to the runtime business view.
- Delete the internal session variable.
- For a given dashboard, create a presentation variable with the same name as the deleted internal session variable such as
As a unsupported practice, a future upgrade may fail without the re-introduction of the original internal session variable.