Forum Discussion
Running Total
- 7 years ago
RunningTote = VAR _SPerson = TableX[sPerson] VAR _Day = TableX[day] RETURN CALCULATE(SUM([dTarget]), FILTER(TableX, TableX[day] <= _Day && TableX[sPerson] = _SPerson))Create a calculated column, swap in your table and column names.
Quick Tip : For better help, post sample data rather than a picture of the data
hi, OLoughanD
You could use Time-intelligence functions: TOTALYTD, TOTALMTD
measre=CALCULATE([DailyTarget],DATESYTD('Date'[Date]))
or filter over the date column using FILTER called as below:
Measure= CALCULATE( SUM(DailyTarget), FILTER (ALLSELECTED ( 'Date'[Date] ), AND ( 'Date'[Date] <= MAX ( 'Date'[Date] ), YEAR ( 'Date'[Date] ) = YEAR ( MAX ( 'Date'[Date] ) ) ) ) )
or
Measure= CALCULATE( SUM([DailyTarget]), FILTER (ALLSELECTED ( 'Date'[Date] ), AND ( 'Date'[Date] <= MAX ( 'Date'[Date] ), AND ( YEAR ( 'Date'[Date] ) = YEAR ( MAX ( 'Date'[Date] ) ), MONTH ( 'Date'[Date] ) = MONTH ( MAX ( 'Date'[Date] ) ) ) ) ) )
Best Regards,
Lin