Skip to main content

Expression Metrics

What is an expression metric?#

Expression metrics allow measures to be modified using a SQL expression. These metrics often include multiple measures. For expression metrics, include the expression as well as a list of the measures used in the expression.

  # Expression metrics allow you to pass in any valid SQL expression. Define all of the measures used in the metric in the "measures" field.  type: expr  type_params:    expr: transaction_amount_usd - cancellations_usd + alterations_usd    measures:      - transaction_amount_usd      - cancellations_usd      - alterations_usd