Skip to content

SQX015 — Non-additive accumulation

Severity: error — blocks saving until fixed.

YTD/RollingSum over something that isn’t a linear combination of Sum/Count aggregates — distinct counts, medians, standard deviations, or ratios between aggregates. A running sum of ratios is silently wrong, so it’s rejected.

Accumulate the parts, then combine: Divide(YTD([Revenue]), YTD([Orders])) instead of YTD([AvgOrderValue]). (Avg alone is fine — it decomposes into sum/count.)

// fails:
AOVYTD := YTD([AvgOrderValue], Date.Date)
// works:
AOVYTD := Divide(YTD([Revenue]), YTD([Orders]))