Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Last 12 Full (Complete) Months Measure

Hi All,   I want to create a Measure that will calculate the Last 12 Full (Complete) Months Sales, ie ignores the Sales for the Current Month and Totals for the past 12 Months.    Pls help.   R...
  • jdbuchanan71's avatar
    6 years ago

    Hell Anonymous 

    Give this a try

    Trailing 12 full months = 
    VAR _T = TODAY()
    VAR _End = EOMONTH( _t , -1 )
    VAR _Start = EOMONTH( _t , -13 ) + 1
    RETURN 
    CALCULATE (
        SUM ( 'Table'[Amount] ),
        DATESBETWEEN( 'Table'[Date] , _Start , _End )
    )

    You will have to change the table and column names to match yours.