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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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,213,527
Messages
6,114,144
Members
448,552
Latest member
WORKINGWITHNOLEADER

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