Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Caldowd98
Helper I
Helper I

Prior 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 )
1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

 
Prior rolling 12 months = CALCULATE([yourmeasure], SAMEPERIODLASTYEAR( Table[Date]))



Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ALLUREAN
Solution Sage
Solution Sage

 
Prior rolling 12 months = CALCULATE([yourmeasure], SAMEPERIODLASTYEAR( Table[Date]))



Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




@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))
 
Jack_Reacher_0-1683019427208.png

 



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.