Forum Discussion
Running Sum is not working
- 4 years ago
In order to use time intelligence like running totals you really want a dedicated calendar table in your model. Then you can disable auto date/time.
A calendar table can be make using DAX like this.
New Table:Dates = ADDCOLUMNS( CALENDARAUTO(), "Year",YEAR ( [Date] ), "Month Year", EOMONTH( [Date] , -1) +1 )Disable auto date/time under File > Options > Current File:
Then cahnge your running total measure like this.
RunningSum2 = CALCULATE ( SUM ( 'Transaction'[ARR_Amount__c_M] ), DATESINPERIOD ( Dates[Date], MAX ( 'Transaction'[Effective_Date__c] ), -1, YEAR ) )I have attached my updated sample file for you to look at.
- 4 years ago
In order to use time intelligence like running totals you really want a dedicated calendar table in your model. Then you can disable auto date/time.
A calendar table can be make using DAX like this.
New Table:
Dates =
ADDCOLUMNS(
CALENDARAUTO(),
"Year",YEAR ( [Date] ),
"Month Year", EOMONTH( [Date] , -1) +1
)
Disable auto date/time under File > Options > Current File:
Then cahnge your running total measure like this.
RunningSum2 =
CALCULATE (
SUM ( 'Transaction'[ARR_Amount__c_M] ),
DATESINPERIOD ( Dates[Date], MAX ( 'Transaction'[Effective_Date__c] ), -1, YEAR )
)
I have attached my updated sample file for you to look at.