SQX015 — Non-additive accumulation
Severity: error — blocks saving until fixed.
What happened
Section titled “What happened”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.
How to fix it
Section titled “How to fix it”Accumulate the parts, then combine: Divide(YTD([Revenue]), YTD([Orders])) instead of YTD([AvgOrderValue]). (Avg alone is fine — it decomposes into sum/count.)
Example
Section titled “Example”// fails:AOVYTD := YTD([AvgOrderValue], Date.Date)// works:AOVYTD := Divide(YTD([Revenue]), YTD([Orders]))