Strategy One
Fact Metrics Array
The factMetrics array defines the quantitative measures in the model (for example, Total Dollar Sales, Total Cost). These are usually simple aggregations over table columns.
Fact Metric Properties
| Field | Type | Description | Example |
|---|---|---|---|
|
|
Object |
Core identity of fact metric. Contains |
{ name: "Total Dollar Sales" }
|
|
|
Object |
Maps the metric to physical table columns with data type. |
|
|
|
String |
Aggregation function such as |
"sum"
|
format
|
Object |
Visual formatting rules for numeric values. |
|
acl
|
Object | Access Control List for the metric. For more information, see Access Control List. | { "USER_ID": { granted: 255 } }
|
|
|
Object |
Localized name and description. For more information, see Translations. |
|
Example
See the following fact metrics file example:
factMetrics:
- information:
name: "Total Dollar Sales"
description: "Total dollar sales amount"
fact:
dataType:
type: "double"
precision: 1000
expressions:
- expression:
text: "tot_dollar_sales"
tables:
- name: "day_ctr_sls"
function: "sum"
format:
values:
- type: "number_category"
value: "1"
- type: "number_format"
value: "#,##0"
