Metrics Question - Expression Logic


I was looking through some of the metrics and I had a question about the logic being applied. For metrics like MDMElectricityConsumptionInterval and UIQConsumptionInterval, I expected overlapping data to be averaged. The metrics are showing that the data is being summed.

Expected Logic - avg(avg(

Observed Logic - sum(sum(

Is this correct? I wouldn’t expect that duplicate MDM or UIQ interval reads should be summed for these metrics. If performing sum is the correct logic, could someone explain why?


So, we generally always write consumption metrics as sums, because generally, you want to track how much consumption happens over a given time period. If you want to track the average consumption over a given period of time, it’s best to create a new metric that uses the average aggregation function, but make sure this is what you want.

There can be a few reasons why you might have overlapping data:

  1. you can have multiple time series that you are evaluating when a metric is evaluating. This can happen if you’re evaluating a metric on a billing account that has multiple child meters that each have their own consumption data stream. OR it can happen if you have multiple Measurement Series objects that match your metric path definition. If this second option is the case, then you may need to change your metric path to be more specific about which measurement series to evaluate.

  2. You can have overlapping (or duplicate) data points in a single measurement series. In this case, these overlapping/duplicate points should be handled by your normalization process (according to whichever logic you have specified, or the default logic of the platform), and the duplicate/overlapping records should be condensed to a single, normalized time series.