Can we use variables in the path of SimpleMetric


#1

Is it possible to use variables in the path of a SimpleMetric? It does not seem to work for the following example:

var sm = SimpleMetric.make({
    "id" : "Aberrant_Measurement_Facility",
    "name" : "Aberrant_Measurement",
    "description": "Contains the aberrant measurement (typeName) from a facility's profileName meter in intervals.",
    "srcType" : "Facility",
    "path" : "site.denormChildFacilities.servicePoints.meterMappings.to.(profile==profileName).pointMeasurements.(measurementType==typeName)",
    "expression": "sum(sum(normalized.data.quantity2) * ( converted ? 1 : multiplier ))",
    "variables": [ {
        "name" : "profileName"
        }, {
        "name" : "typeName"
    } ]
})
var results = Facility.evalMetricsWithMetadata({
  expressions:["Aberrant_Measurement"], 
  ids: [this.site.id],
  start: '2018-07-31',
  end: '2018-08-06',
  interval: 'DAY',
  bindings: {"profileName": "GGAZ", "typeName": "volume"}
}, [sm])
c3Viz(results)

#2

Yes this is supported. What version of the server are you guys on? This is def in v7.8


#3

I’m in 7.6, is it supported?