Calculate Transform

Edit this page

The formula transform extends data objects with new fields (columns) according to an expression.

// Any View Specification
{
  ...
  "transform": [
    {"calculate": ..., "as" ...} // Calculate Transform
     ...
  ],
  ...
}

Calculate Transform Definition

Property Type Description
calculate String

Required. A expression string. Use the variable datum to refer to the current data object.

as String

Required. The field for storing the computed formula value.

Example

This example uses calculate to derive a new field, and then filters the data based on the new field.