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
Blucas2018
Regular Visitor

SAMEPERIODLASTYEAR not working for old database

Hi,

I'm going through this tutorial but I'm having trouble using SAMEPERIODLASTYEAR on a table where the latest date is from 3 years ago.

 The tutorial recommned using:

 

  • Total Units: Total Units = SUM(Sales[Units])
  • LY Total Units: LY Total Units = CALCULATE([Total Units],SAMEPERIODLASTYEAR('Date'[Date]

but I get the same value for both measures. Could that be SAMEPERIODLASTYEAR is looking for 2017, therefore counting everything like SUM?

The data goes from year 2000 to 2015

Any suggestions

 

 

 

 

1 REPLY 1
Floriankx
Solution Sage
Solution Sage

Did you relate your date columns properly?

SAMEPERIODLASTYEAR doesn't know the actual year, and it doesn't how far your data goes back.

 

Is your date Table contigous and goes back far enough?

 

Best regards.

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.