8.3 Core Historian - Tag History Query - Seeing issues with missing values handling

Hi,

We are using Ignition 8.3 core historian and using Tag History Query to calculate week wise total flow for last 51 weeks.

Below is the snapshot of tag history query binding with Prevent Interpolation -

On current setup, data is present only for latest one week, so we expected valid values for that week and 0 or None for all previous weeks.

As shown in screenshot below, left side table shows count = 0 for all previous weeks whereas latest week’s non zero Sum value is back filled for all previous weeks as seen in the right side table though no data exists for that time period.

If the values are absent for some time period, we want the Sum to be 0. Are we missing some configuration other than prevent interpolation ?

Aggregate function count seems to be working correctly.

We also tried the scripting function system.historian.queryAggregatedPoints as below -

system.historian.queryAggregatedPoints(['<historian_tag_path>'], startTime, endTime, aggregates=['Sum'], fillModes = [None], returnFormat= 'wide', returnSize = 51)

This also returns sum for all previous week’s = current week’s sum.

What should be the valid value for fillModes so that it doesn’t backfill for missing data ?

Appreciate help in this regard.

Thanks !