Forum Discussion
Rolling Total not showing as needed - please help
- 1 year ago
You can try
Rolling Total Selected Dates = VAR MaxDate = MAX ( __dimDate[Date] ) VAR Result = CALCULATE ( [__Number of distinct Agreements], USERELATIONSHIP ( __dimDate[Date], agreement[Received Date] ), FILTER ( ALLSELECTED ( __dimDate[Date] ), __dimDate[Date] <= MaxDate ) ) RETURN Resultand
Rolling Total All Time = VAR MaxDate = MAX ( __dimDate[Date] ) VAR Result = CALCULATE ( [__Number of distinct Agreements], USERELATIONSHIP ( __dimDate[Date], agreement[Received Date] ), __dimDate[Date] <= MaxDate ) RETURN Result - 1 year ago
Change measure 1 to be
Rolling Total Selected Dates = VAR MaxDate = MAX ( __dimDate[Date] ) VAR Result = CALCULATE ( [__Number of distinct Agreements], USERELATIONSHIP ( __dimDate[Date], agreement[Received Date] ), FILTER ( ALLSELECTED ( __dimDate ), __dimDate[Date] <= MaxDate ) ) RETURN ResultThat is moving the ALLSELECTED from the column to the full table.
johnt75 - I think I was premature in marking it as the solution. Thanks for your help.
Both of your measures are returning the same result. The below screenshot is the resultset for both of your measures (I've filtered the Team Name to be just 'Res').
The above output is what I require for Measure 2. However, for Measure 1, I required the rolling total for only the years selected. Below are the numbers for each individual FY.
So Measure 1 would be:
FY Res
2024-25 64
2023-24 49
2022-23 35
2021-22 19
2009-10 0
It's only rolling totalling the years selected. Can you help please? Thanks.
Change measure 1 to be
Rolling Total Selected Dates =
VAR MaxDate =
MAX ( __dimDate[Date] )
VAR Result =
CALCULATE (
[__Number of distinct Agreements],
USERELATIONSHIP ( __dimDate[Date], agreement[Received Date] ),
FILTER ( ALLSELECTED ( __dimDate ), __dimDate[Date] <= MaxDate )
)
RETURN
Result
That is moving the ALLSELECTED from the column to the full table.