I'm aiming to calculate a cumulative total for Income Accounts and cumulative periods.
However the formula below returns a number that is far different from I expect. Leaving the formula with the period filter returns all cumulative amounts which is fine.
However everything changes when I add the additional Account Filter. Any suggestions on what's not working/missing?
(edit --> removing the ALL in the AccountFilter VAR disables the cumulative impact and returns data for the period only).
Thanks
OS_PAF_INC_YTD:=
VAR AccountFilter = FILTER(ALL( 'GP Data'),'GP Data'[Rubric 1] ="01. Income")
VAR PeriodRange = FILTER(
ALL ( 'GP Data'),( 'GP Data'[Period] <=MAX('GP Data'[Period])
)
)
RETURN
CALCULATE(
- [Sum of AMOUNT] ,
PeriodRange,
AccountFilter
)