Concepts → Presentation variable

About a presentation variable

Defined in Dashboard Filters, a presentation variable is a referenceable and mutable variable of a specific data type with a default value that exists only within the scope of the given dashboard and a user accessing the dashboard.

The definition of a presentation variable overrides the default behavior of a 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. Once defined and configured, a presentation variable appears in the Columns panel in the Filter dialog and as a filter bar pill. A dashboard consumer can assign a new value to a presentation variable in the Filter dialog.

Unlike a prompt, applied filter, or filter option, a presentation variable is not in itself a filter expression.

A dashboard developer defines zero or more presentation variables for a given dashboard.

Often, a dashboard developer references a presentation variable as a filter value in a filter expression or as a part of formula in a formula expression.

A dashboard consumer can assign a new value to a presentation variable in the Filter dialog. Unlike a session variable, the new value is 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 Dashboard Filters Manager.
  • In Dashboard Filters, select Presentation Variables.
  • From the Data panel, drag & drop a column or formula to the presentation tray.

Supported usage

Because a presentation variable is a mutable, 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

Unsupported usage

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 pill in an Incorta Analyzer View or Incorta Analyzer 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 filter value for an individual filter, aggregated filter, or measure filter for an Incorta Analyzer View or Incorta Analyzer Table
  • as a default filter value for a prompt
  • as part of a formula expression for a formula column in a runtime business view
Note

To learn more about referencing a presentation variable as part of a formula expression for a formula column in a runtime business view, see Additional considerations for a presentation variable below.

Properties for a presentation variable pill

The following are the properties of a presentation variable

PropertyControlDescription
Column Labeltext boxRequired. 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 nametext boxRequired. This is the variable name.
Data Typedrop down listRequired. Set the data type for the variable as string, double, long, integer, or date.
Field (Optional)tray and pillOptional. Drag and drop zero or more columns from the Data panel to the tray. The pill populates the available values that appear in the Values panel of the Filter dialog for the presentation variable.
Field (Optional) → Sort Bytray and pillDrag and drop zero or more columns from the Data panel to the tray. Select the ascending or descending icon to the left of each pill to change the sort order. You can use only columns from the same physical schema table as the presentation variable.
Additional Valuestext boxEnter the value you need to search for, or select the (x) button to list all of the system variables available.
Edit In BulklinkSelect to switch to entering the additional values in a text box manually. You can enter them comma delimited or using line break.
Default Valuetext box, calendar, or list selectionRequired. Enter a default value for the presentation variable. A default value can be system variable, internal session variable, external session variables, or user defined.
Hide from filter bartoggleOptional. Disabled by default. Enable to hide the presentation variable from the filter bar. This option was firstly introduced with the 2023.1.0 release.
Warning

Although it may be possible to specify a presentation variable as a default value or as an assigned value of another presentation variable, this configuration is not supported and may produce unexpected results.

A variable as a default value or assigned value

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.

Important: Session variables store string values

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 typePresentation variable
data type
Default
value
Assigned
value
Date system variabledate
External session variablestring
Global variablestring
Global variableinteger, long, double
Global variabledate
Filter expression session variablestring
Internal session variablestring
Miscellaneous system variablestring
Presentation variable

Additional considerations for a presentation variable

Note

If you have a global variable and a presentation variable that share the same name, the presentation variable will take precedence over the global variable.

A schema developer and dashboard developer may implement the 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 pv_Example.
  • 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 pv_example.

A future upgrade may fail without the re-introduction of the original internal session variable.