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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
cafarrel
Regular Visitor

Same Period Last Year gives me the same as this year

I have a model with a date_dim table and I'm using the same period last year function:

MLI Units SPLY = calculate (sum(MLI_Fact[Units]), sameperiodlastyear(Date_Dim[Date]))

And it gives me the exact same number as the current year...

I've tried parrallelperiod and it's also not working... Any idea why? 

1 ACCEPTED SOLUTION

Thank you Phil for your reply. I have just discovered a solution (not really the problem) - replacing every possible date filters using the date dimension table instead of what was in my fact table solved the issue... rookie mistake!

Thank you!

View solution in original post

3 REPLIES 3
Phil_Seamark
Employee
Employee

HI @cafarrel

 

On the surface your syntax looks good.  When you plot your data in a table with dates and this measure, does your last year data definitely have a different value for the SUM?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thank you Phil for your reply. I have just discovered a solution (not really the problem) - replacing every possible date filters using the date dimension table instead of what was in my fact table solved the issue... rookie mistake!

Thank you!

Hi @cafarrel,

 

I'm glad to hear that you have resolved your issue. Please kindly mark your solution as answer. It'll benefit others with relevant issue. Smiley Happy

 

Thanks,
Xi Jin.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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