Tomas Corinfeld
12/23/2025, 2:04 PMJoseph Heun
12/23/2025, 2:19 PMRUNSUM function.
For a basic running sum of a fact/metric:
SELECT RUNSUM({metric/TEST_DHS_3})
or, if you are summing a fact directly:
SELECT RUNSUM({fact/facturacion_equivpr})
This behaves like the UI running total: each row’s value is added to the previous rows’ values in the current date sequence. [*Running totals core*; Metric running totals]
If you need the running sum to restart within a period (for example, per year), add WITHIN with a date attribute:
SELECT RUNSUM({metric/TEST_DHS_3}) WITHIN ({label/date.year})Tomas Corinfeld
12/26/2025, 12:08 PM