DAX 每月累加數據 by year
想要做到以下結果 Month Recurring Cumulative Expected 2016-01-01 0:00 0 0 0 2016-02-01 0:00 5 5 5 2016-03-01 0:00 5 5 10 2016-04-01 0:00 5 5 15 2016-05-01 0:00 5 5 20 2016-06-01 0:00 5 5 25 2016-07-01 0:00 5 5 30 2016-08-01 0:00 5 5 35 2016-09-01 0:00 5 5 40 2016-10-01 0:00 5 5 45 2016-11-01 0:00 5 5 50 2016-12-01 0:00 5 5 55 將其創建新增為計算列。 計算所有先前行/日期的總和 Cumulative = VAR RowDate = Table1[Date] RETURN CALCULATE ( SUM ( Table1[Recurring] ), FILTER ( Table1, Table1[Date] <= RowDate && YEAR ( Table1[Date] ) = YEAR ( RowDate ) ) ) 另外可以加上時間表 搭配max 抽出每個月的數值 See also :