Showing results for 
Search instead for 
Did you mean: 
Coan7 Member

leap year correction



I have made measures that show last 12 and 24 months (rolling 12 month/24 months), 
When I select year 2020 I get a wrong value for February. 

case sales:

2019 value 28th feb = 20

year           last 12 month   last 24 month
2020                                   (2019)
feb            10                       40
28th          10                       20
29th           -                         20

There is an extra line for the 29th day in feb-2020 and this get the same value as 28th feb 2019. How can I correct for the leap year error?

N is number of months


Salgsinntekt forrige N mnd =
var Ldato = DATE(MAX('Year'[year]);MAX(Mnd[order])+1;1)
var Fdato = EDATE(Ldato;-(MAX(N[N])))
var Sales = CALCULATE([Sales];SAMEPERIODLASTYEAR(Calendar[date]))


Community Support
Community Support

Re: leap year correction

Hi @Coan7 ,


I'm not very clear about your requirements. Can you give me more information?



Best Regards,


Helpful resources

Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors