Forum Discussion
Caldowd98
Helper I
4 years agoPrior rolling 12 months
Hi community
I have a measure that cacluates a sum of the last 12 months of data.
I now want to create the prior 12 months of data, so in theory -12 - -24 months.
An example of my measure is below, how would i adapt this to get the prior year ?
Many thanks!
CALCULATE(
SUM( 'Table'[QTY] ),
DATESINPERIOD( Table[Date].[Date], MAX( Table[Date] ), -12, MONTH )
- Prior rolling 12 months = CALCULATE([yourmeasure], SAMEPERIODLASTYEAR( Table[Date]))
2 Replies
- ALLUREAN
Solution Sage
Prior rolling 12 months = CALCULATE([yourmeasure], SAMEPERIODLASTYEAR( Table[Date]))- AnonymousNot applicable
ALLUREAN , amitchandak Hi, can you please tell how I can make my graphs overlap with one another, I have two dax codes, one for current rolling 12 months, and another one for prior rolling 12 months, as below;
AAAM_Prior_R12M =CALCULATE([Sum_Two_Rows], SAMEPERIODLASTYEAR( Calendrier[Date]))AAAM_Current_R12M = CALCULATE(([Sum_Two_Rows]), DATESINPERIOD('Calendrier'[Date], ENDOFMONTH('Appointments Manager'[Period date]), -12, MONTH))