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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Fabrizio
Regular Visitor

how can i get rid of spikes in rolling 12 months calculation?

Hi

i have a measure for rolling 12 months, we have daily unit sales - except on weekends. That creates spikes in the rolling 12 months measure (due to weekend shifts from one year to the other). I would like to flatten this, maybe with some sort of rolling 7 days as an intermediate calculation? 

Do you have any idea, how i could solve this? 

 

rolling 12 months.PNG

 

The measure i use for the rolling 12 months looks like this:

 

Total Actual Rolling 12 Months =
CALCULATE(
[Total Actual],
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -1, YEAR))
 
Thank you in advance. 
 
Fabrizio
5 REPLIES 5
Fabrizio
Regular Visitor

Hi @lbendlin 

i struggled trying to build/combine these two calculations. Do you have an example calculation on which i could build? 

Please provide sanitized sample data that fully covers your issue.

Please show the expected outcome based on the sample data you provided.

Hi @lbendlin 

Sorry for the late response. I can't provide any sample data. 

And i can't show the expected outcome because i can't produce it.. 

But i think i explained it: I would like to flatten the daily spikes of my 12 months rolling line chart. 

 

So maybe it is possible for you to show me a generic calculation on how i could calculated a weekly average and use this for the rolling 12 months (which is calculated on daily basis) ? 

 

 

"I can't provide any sample data. "

 

I cannot help you without sample data.

lbendlin
Super User
Super User

Yes, a sliding window average (let's say three days prior to three days after) should give you the required smoothing.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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