Question
How to display cumulative totals up to a specific year and month?
How to display cumulative totals up to a specific year and month?
IF ATTR(DATEPART('year', [Order Date])*100 + DATEPART('month', [Order Date])) <= [Select year]*100 + [Select month] THEN RUNNING_SUM(SUM([Sales])) ELSE 0 END4. Add YEAR(Order Date) and MONTH(Order Date) to Columns.