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

information

Object

Core identity of the fact metric. Contains primaryLocale (the locale of the user who created the object), objectId (the unique 32-character hex identifier for the object), subType (metric), name, and description.

{ name: "Yearly Sales Performance" }

acl

Object

Access Control List defining permissions for user/group IDs. For more information, see Access Control List.

{ "294DEDC...": { granted: 255 } }

translations

Object

Localized name and description. For more information, see Translations.

{ name: { translationValues: {...} } }

expression

Object

The mathematical formula definition.

{ text: "Sum<...>([Fact1]){...}" }

formulaJoinType String Defines how the metric formula joins with other objects. "default"

smartTotal

String

Defines how totals are calculated for the metric.

"decomposable_false"

dataType Object The data type of the resulting metric value. { type: "reserved" }

format

Object

Defines the header and value level formatting.

{ values: [...] }

pushDownBehavior String Specifies if calculation is pushed down to the source. "default"

filters

Array

Define qualifications for the metric. This field is optional.

[ { name: "Filter 1", ... } ]

Example

See the following metrics file example:

Copy
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"