Fields - Calculation
Calculation
Calculations can reference other fields such as dimensions, measures and calculations.
fields: #begin of fields section (inside View or Model)
- calculation: calculation_name
hidden: false
label: 'field label in UI'
description: 'description in UI'
result: calculation_result
sql: 'SQL expression'
format_number: '$,.0f'
currency_prefix: $
currency_suffix: ''
Calculation Parameters
Name | Type | Default | Description |
---|---|---|---|
calculation* | string | - | Field name |
label | string | - | Override field name in UI |
hidden | boolean | false | Hide field in UI |
description | string | - | Field description in UI |
result | enum | "number" | Resulting data type (after SQL transformations):
|
sql* | string | - | Way to calculate field through SQL expression (must use BlockML reference to other fields - dimensions, measures, calculations) |
format_number | string | - | Format Number |
currency_prefix | string | - | Format Number - Symbol |
currency_suffix | string | - | Format Number - Symbol |