Composing Expressions

You can compose an expression to use in an expression filter or in a calculation. For both expression filters and calculations, you use the Expression Builder. Expressions that you create for expression filters must be Boolean (that is, they must evaluate to true or false). Expressions that you create for calculations aren’t limited in this way.

Note:

While you compose expressions for both expression filters and calculations, the end result is different. A calculation becomes a new data element that you can add to your visualization. An expression filter, on the other hand, appears only in the filter bar and can’t be added as a data element to a visualization. You can create an expression filter from a calculation, but you can’t create a calculation from an expression filter. See Creating Calculated Data Elements and Building Expression Filters.
You can compose an expression in various ways:
  • Directly enter text and functions in the Expression Builder.

  • Add data elements from the Data Elements pane (drag and drop, or double-click).

  • Add functions from the function panel (drag and drop, or double-click).

See Expression Editor Reference.