Strategy One
Metrics Array
The metrics array defines derived measures based on fact metrics, constants, or other metrics. They contain complex logic and can include filtering and nested functions.
Metric Properties
| Field | Type | Description | Example |
|---|---|---|---|
|
|
Object |
Core identity of the fact metric. Contains |
{ name: "Yearly Sales Performance" }
|
|
|
Object |
Access Control List defining permissions for user/group IDs. For more information, see Access Control List. |
|
|
|
Object |
Localized name and description. For more information, see Translations. |
|
expression
|
Object |
The mathematical formula definition. |
|
formulaJoinType
|
String | Defines how the metric formula joins with other objects. | "default"
|
|
|
String |
Defines how totals are calculated for the metric. |
|
dataType
|
Object | The data type of the resulting metric value. | { type: "reserved" }
|
|
|
Object |
Defines the header and value level formatting. |
|
pushDownBehavior
|
String | Specifies if calculation is pushed down to the source. | "default"
|
|
|
Array |
Define qualifications for the metric. This field is optional. |
|
Example
See the following metrics file example:
metrics:
- information:
primaryLocale: "en-US"
objectId: "1C96B62DDD354C9D8395302660D047BB"
subType: "metric"
name: "Yearly Sales Performance"
description: "This metric calculates the total sales performance by year."
acl:
"294DEDC011D2F1D56000D98E67019608":
granted: 255
denied: 0
inheritable: false
translations:
name:
targetName: "Object Name"
translationValues:
1033:
translation: "Yearly Sales Performance"
expression:
text: "Sum<UseLookupForAttributes=False>([Gross Dollar Sales]){[Year (2)]+}<[%Filter 1%]>"
formulaJoinType: "default"
smartTotal: "decomposable_false"
dataType:
type: "reserved"
format:
header: []
values: []
pushDownBehavior: "default"
filters:
- name: "Filter 1"
qualification:
tree:
type: "predicate_form_qualification"
predicateTree:
function: "greater"
parameters:
- parameterType: "constant"
constant:
type: "int32"
value: "2020"
attribute:
name: "Year"
