Skip to main content
Calculated fields let you define new measures and dimensions on the fly while exploring data in Workbooks and Explore. They are scoped to the current query and do not alter your data model, so you can experiment with new metrics without a deployment cycle.
Calculated fields are currently available as query-level fields in Semantic Query tabs and Explore. Support for additional field types is planned for a future release.

When to use calculated fields

Use calculated fields when you need to:
  • Compute a ratio, percentage, or difference between existing measures
  • Derive a new dimension from existing dimensions (for example, concatenating first and last name)
  • Test a metric definition before adding it to the data model
  • Create one-off calculations for a specific analysis without involving a data engineer
If you find yourself reusing a calculated field across multiple workbooks, consider promoting it to a calculated measure or dimension in the data model so it can be governed, reused, and pre-aggregated.

Creating a calculated field

1

Open a Semantic Query tab or Explore

In a workbook, open an existing Semantic Query tab or create a new one. You can also start from the Explore page.
2

Add a calculated field

In the left pane, click the + button next to the measures or dimensions section and select Calculated field.
3

Write the expression

Enter a SQL expression that references existing measures or dimensions from the current view. For example, to calculate a completion rate:
1.0 * completed_count / count
You can use standard SQL functions and operators supported by your data source.
4

Name the field

Give the calculated field a descriptive name. This name appears in the results table and any visualizations you build.
5

Use the field

The calculated field is now available alongside your other measures or dimensions. You can use it in visualizations, pivot tables, filters, and sorting just like any model-defined field.

Expression syntax

Calculated field expressions use SQL syntax. You can reference any measure or dimension available in the current semantic view by name.

Supported operations

OperationExample
Arithmeticrevenue - cost
Division with decimals1.0 * completed_count / total_count
String concatenationfirst_name || ' ' || last_name
Conditional logicCASE WHEN status = 'active' THEN 1 ELSE 0 END
SQL functionsROUND(revenue / orders, 2)
Available SQL functions depend on your connected data source. For example, CONCAT() works in most databases, but string concatenation with || may not be supported in all of them.

Calculated field scope

Calculated fields are scoped to the individual query where they are created. They are:
  • Not saved to the data model — they exist only within the workbook tab or Explore session where you created them
  • Saved with the workbook — if you save or publish the workbook, your calculated fields are preserved in that workbook
  • Not available in other workbooks — to share a metric across workbooks, add it to the data model as a calculated measure

Limitations

  • Calculated fields are available in Semantic Query tabs and Explore only, not in Source SQL tabs
  • Pre-aggregations do not apply to calculated fields since they are not part of the data model
  • Access control policies defined in the data model do not apply to calculated field expressions directly, though the underlying measures and dimensions they reference still respect access control