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
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
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.