Skip to main content Skip to complementary content

Expression editor

An expression is a calculation that produces a value or data set. It can be a combination of functions, fields, and mathematical operators. Expressions are used to process data in the app in order to produce a result that can be seen in a visualization.

Click Open Expression editor (Expression) in the properties panel when editing a visualization or a sheet.

The Expression symbol indicates an expression field, for example titles, subtitles, footnotes, dimensions, and measures.

Click Expression in the properties panel to open the expression editor

Open expression editor in properties panel

Expression editor

Expression editor

Type directly into the expression editor, or use the expression editor panel to build expressions.

In the expression editor, you can enter an expression by typing in the expression field. When you type the name of a function in the expression, a tooltip appears that provides information to help you enter the function correctly, including argument names and qualifiers.

See:

Fields

Select a field from a specific table and a common aggregation function to generate some common expressions to be inserted into the expression editor. You can also select system fields.

To learn more about aggregation functions, see Basic aggregation functions, Counter aggregation functions and Statistical aggregation functions.

To learn more about system fields, see System fields.

Clauses and set expressions

Some aggregation functions might require a Distinct clause or a Total clause. Use the check box for each clause to insert it in the aggregation function. Each clause can be used independently.

Use the Set Expression check box to insert your current selection as a set expression in your aggregation. The current selection inserted will always be based on the default state. If you want to create an expression based on an alternate state use the Set Expressions section instead.

To learn more about how to use these set expressions, see Set modifiers.

To learn more about alternate states see Using alternate states for comparative analysis.

Functions

Select a function from a specific category to insert it into the expression editor. You can use functions to generate more complex expressions. A small syntax template shows you how each function is used.

See: Script and chart functions

Set expressions

Select whether you want to insert the current selection or a bookmark as a set expression. If available, you can choose which alternate state on which to base the current selection or bookmark.

Variables

Select variables and insert them in your expressions. If available, a definition and the value of each variable is shown.

See: Using variables in expressions

Learn more

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!