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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sosot31
New Member

Leap Year & Same Period Last Year Issue

I would like to do a comparison for sales current year and last year. However, 29/2/24 last year sales returned to 28/2/23.
29/2/24 LY sales suppose to return as 0.

My measure is 

Sales LY = CALCULATE([Sales],SAMEPERIODLASTYEAR(dim_date[Date]))


Is there a way to show 0 on 29/2/24 Last year sales? 
  

sosot31_0-1715745946177.png

 

Best Regards,

Sosot

1 REPLY 1
lbendlin
Super User
Super User

For a true "Same Period Last Year"  calculation subtract 364 days.  That will work in all years, including leap years, and will get you closer to a "like for like"  comparison.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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