Can I have a measurement with two quantities

#1

Hi to all,
I have tow quantities to stock, then to be measured by two metrics, can I use the same type Measurement with two entries for quantity ? and target the one I want using my metrics ?

I don’t want to create two C3 type for the same logical entity, not to talk about, the extra save on disk.

Many thanks.

0 Likes

#2

You can have your quantities on the same measurements if you do integrate them through canonicals on the same time. E.g.

remix type PointMeasurement {
  @ts(treatment='rate')
  quantity1: double

  @ts(treatment='rate')
  quantity2: double
}

Then you can have two metrics like this:

{
    "id": "SimpleMetric1_Facility",
    "name": "SimpleMetric1",
    "description": "Contains the values for quantity1.",
    "srcType": "Facility",
    "path": "servicePoints.meterMappings.to.pointMeasurements",
    "expression": "sum(sum(normalized.data.quantity1)"
}
{
    "id": "SimpleMetric2_Facility",
    "name": "SimpleMetric2",
    "description": "Contains the values for quantity2.",
    "srcType": "Facility",
    "path": "servicePoints.meterMappings.to.pointMeasurements",
    "expression": "sum(sum(normalized.data.quantity2)"
}
2 Likes

#3

Alternatively, you can just create two sets of MeasurementSeries with different values of measurementType and they can coexist peacefully.

1 Like