Forum Discussion
Cumulative Running Total by week in a Matrix
- Anonymous8 years ago
HI alforc1,
If you want to get YTD cumulative running total, I think you need to add a year condition to control formula work on same year range.
Volume BU Rolling FYTD = CALCULATE ( SUM ( EPOS[Volume BU] ), FILTER ( ALLSELECTED ( 'Date'[Week End Date] ), YEAR ( 'Date'[Week End Date] ) = YEAR ( MAX ( 'Date'[Week End Date] ) ) && 'Date'[Week End Date] <= MAX ( 'Date'[Week End Date] ) ) )Regards,
Xiaoxin Sheng
- 8 years ago
Hi, I have a further question in relation to the the previous. The dax works up until the end of the current year but I need the cumulative total to also run into the next year. can you advise how I would amend the DAX below to roll over into the following year. So at the end of 2017 the cumulative resets but I would like it to continue into 2018.
Any help would be appreciated.
Volume BU Rolling FYTD =
CALCULATE (
SUM ( EPOS[Volume BU] ),
FILTER (
ALLSELECTED ( EPOS[Week End Date]),
YEAR ( EPOS[Week End Date] ) = YEAR ( MAX ( EPOS[Week End Date] ) )
&& EPOS[Week End Date] <= MAX ( EPOS[Week End Date] )
)Regards
Chris
)
That has worked perfectly. You have saved my day.
Thank you for answering Xiaoxin Sheng.
Regards
Chris
Hi, I have a further question in relation to the the previous. The dax works up until the end of the current year but I need the cumulative total to also run into the next year. can you advise how I would amend the DAX below to roll over into the following year. So at the end of 2017 the cumulative resets but I would like it to continue into 2018.
Any help would be appreciated.
Volume BU Rolling FYTD =
CALCULATE (
SUM ( EPOS[Volume BU] ),
FILTER (
ALLSELECTED ( EPOS[Week End Date]),
YEAR ( EPOS[Week End Date] ) = YEAR ( MAX ( EPOS[Week End Date] ) )
&& EPOS[Week End Date] <= MAX ( EPOS[Week End Date] )
)
Regards
Chris
)