SAMEPERIODLASTYEAR Function

Chers

New Member
Joined
Mar 16, 2015
Messages
6
Hello... I am in a middle of powerpivot where i have put a calculated field using SAMEPERIODLASTYEAR.

Total Rev LY (AED):=CALCULATE([Total Rev (AED)],SAMEPERIODLASTYEAR(fPOSData[MonthYear]))

It worked and it gave me a figure as a result.

But when i am dropping it in the pivot table, it says it could not add the field to the Pivot Table because the formula is invalid.

My month-year column in my fact table is connected to the dimension table of dates.

How do i fix this? Thanks a million.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
It is marked as the date table. My dates column has this as first column:
MMMYY</SPAN></SPAN>
01/03/2013 00:00:00</SPAN></SPAN>
01/04/2013 00:00:00</SPAN></SPAN>
01/05/2013 00:00:00</SPAN></SPAN>
01/06/2013 00:00:00</SPAN></SPAN>
01/07/2013 00:00:00</SPAN></SPAN>
01/08/2013 00:00:00</SPAN></SPAN>
01/09/2013 00:00:00</SPAN></SPAN>
01/10/2013 00:00:00</SPAN></SPAN>
01/11/2013 00:00:00</SPAN></SPAN>
01/12/2013 00:00:00</SPAN></SPAN>

<TBODY>
</TBODY>
I have changed the formula to:
Total Rev LY:=CALCULATE([Total Rev],SAMEPERIODLASTYEAR(dDate[MMMYY]))


This time the result is the same as my Total Rev... and it still doesn't drop into my pivot table :(
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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