Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

Using variables in expressions

A variable in Qlik Sense is a container storing a static value or a calculation, for example a numeric or alphanumeric value. When you use the variable in the app, any change made to the variable is applied everywhere the variable is used. You can define variables in the variables overview, or in the script using the Data load editor. You set the value of a variable using Let or Set statements in the data load script.

Tip noteWhen using variables in expressions, you can change the expression used in a range of charts simultaneously simply by editing the variable.

You open the Variables overview by clicking Variables in the edit bar when editing a sheet.

The following actions are available in the variables overview:

  • Create a new variable.
  • Edit the selected variable.

  • Delete the selected variable.
Information noteTo edit or delete a variable that is defined in the script, you must edit the script.

Getting an overview of all variables in an app

You can get an overview of all variables in an unpublished app.

  • When editing a sheet, click Variables in the edit bar on the sheet to open the variables dialog.

    The variables dialog opens and displays a list of all variables in the app and their definitions (if any).

Examples

For examples of how to use variables in expressions, see Examples of using a variable in an expression.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!