Forum Discussion
D_PBI
Post Partisan
1 year agoRolling Total not showing as needed - please help
Hi, I need to create two measures as follows: Measure 1) to show the rolling total up to the last (max) date as specified in the matrix. Measure 2) to show the rolling total for all dates, whether...
- 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.