SAMEPERIODLASTYEAR not working

Sharkie21

Active Member
Joined
Nov 2, 2005
Messages
319
I keep getting the same results for the current period and the prior period.

My formulas are:

Total Cost = sum(Data[Claim_Cost])

Total Cost LY = Calculate([Total Cost],SAMEPERIODLASTYEAR('Date'[Date].[Date]))

When I drop these two measures into a table visual, I get the same value for each month/year.

e.g.

Jan 2015 - Shows 39M for both Total Cost and Total Cost LY.

Whereas Jan 2015 was 39M and Jan 2014 was 34M

Thank you.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I keep getting the same results for the current period and the prior period.

My formulas are:

Total Cost = sum(Data[Claim_Cost])

Total Cost LY = Calculate([Total Cost],SAMEPERIODLASTYEAR('Date'[Date].[Date]))

When I drop these two measures into a table visual, I get the same value for each month/year.

e.g.

Jan 2015 - Shows 39M for both Total Cost and Total Cost LY.

Whereas Jan 2015 was 39M and Jan 2014 was 34M

Thank you.

try deleting the last.[date] so just use Date[Date]
 
Upvote 0
Microsoft has built capabilities for Power Pivot to do time intelligence calculations without the need for a calendar table. This is called auto time telligence. It can be turned off in the settings. The date.date syntax is part of that auto time intelligence. It is designed (in my view) for "casual" use of Power Pivot without the need to know DAX. I personally never use it and prefer to have control with a calendar table.
 
Upvote 0
Microsoft has built capabilities for Power Pivot to do time intelligence calculations without the need for a calendar table. This is called auto time telligence. It can be turned off in the settings. The date.date syntax is part of that auto time intelligence. It is designed (in my view) for "casual" use of Power Pivot without the need to know DAX. I personally never use it and prefer to have control with a calendar table.


Thanks Matt
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top