About 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 are not 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, only appears in the filter bar and cannot be added as a data element to a visualization. An expression filter can be created from a calculation, but a calculation cannot be created from an expression filter. For more information, see Creating Calculated Data Elements and Building Expression Filters.
You can compose an expression in various ways:
  • You can directly enter text and functions in the Expression Builder by typing.

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

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

For more information about expression elements, see Expression Editor Reference.