Forum Discussion
chreds
10 years agoRegular Visitor
DAX - Running Total YTD
I'm trying to calculate a running total YTD and am having trouble getting it to work. Here's my table: Month Recurring Cumulative Expected
2016-01-01 0:00 0 0 0
2016-02-01 0:00 5 5 5
2016-03...
- 10 years ago
chreds The relationship is needed for measure and time intelligence.
Yes you can create as a calculated column. You calculate the sum of all the previous rows/dates
Cumulative = VAR RowDate = Table1[Date] RETURN CALCULATE ( SUM ( Table1[Recurring] ); FILTER ( Table1; Table1[Date] <= RowDate && YEAR ( Table1[Date] ) = YEAR ( RowDate ) ) )You can use or delete
&& YEAR ( Table1[Date] ) = YEAR ( RowDate )
if you need YTD or Cumulative Life to date
Howard_Hong
8 years agoFrequent Visitor
Using the same table, but assuming two additional years of data (5 recurring per month),, how can I get a monthly average for the three years combined?
Thanks,
Howard