cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Miro
Advocate I
Advocate I

SAMEPERIODLAST YEAR doesnt account for February Leap year

I have noticed that when doing Last Year Calculation, Sameperiod Last Year shows inconsistencies for February when there was a leap year either current/selected or it was a previous one.
Any recommendations to tackle the issue?

1 ACCEPTED SOLUTION
olgad
Memorable Member
Memorable Member

Hi there,
I had a similar issue, DATEADD worked well to solve this. 
Try 

LY = Calculate([Sales], DATEADD('Date'[Date], -1,YEAR))

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

1 REPLY 1
olgad
Memorable Member
Memorable Member

Hi there,
I had a similar issue, DATEADD worked well to solve this. 
Try 

LY = Calculate([Sales], DATEADD('Date'[Date], -1,YEAR))

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors