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
Anonymous
Not applicable

3-mo, 6-mo, and 12-mo 2 Year Stack Rolling Average

Hello,

 

I am having trouble getting an accurate rolling average once the year changes. For instance, if I am looking at a 3-month rolling average from April, I get the correct numbers. However, if I look at the average from March, the numbers are off. I believe it has something to do with the year changing (from March I need to see the previous Feb, Jan, and Dec). The same thing happens with the 6-month and 12-month averages if I am looking at 2 different years. 

 

Here are my formulas:

 

M_2YS_3Mo = [M_3Mo TY Running total]/[M_3Mo LLY Running Total]-1

 

M_3Mo TY Running Total = CALCULATE ([TY_Comp_Sales], DATESINPERIOD (Cal_Day[Day_Date], LASTDATE ( PREVIOUSMONTH ( Cal_Day[Day_Date] ) ), -3, MONTH))
 
M_3Mo LLY Running Total = CALCULATE ([LLY_Comp_Sales], DATESINPERIOD (Cal_Day[Day_Date], LASTDATE ( PREVIOUSMONTH ( Cal_Day[Day_Date] ) ), -3, MONTH))
 
Any thoughts would be greatly appreciated. 
0 REPLIES 0

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.

Top Solution Authors