Help with SamePeriodLastYear

VRGood

New Member
Joined
Apr 10, 2014
Messages
13
Excel 2010
64 Bit
PowerPivot AddIn

Hello all,

I'm having to make modifications to a PowerPivot Table due to change in data structure.

I have succeeded in creating the new measure called "NewSales" below:

=Calculate('Tkt Sales Tbl'[Sum of SAL_SUB_TOT 2])-('PSTktLinTbl'[Sum of Ext_Prc])

I now need to use this measure in a calculation for SamePeriodLastYear. I have tried unsuccessfully to simply change the field name in the formula below but keep getting an the error message "Column 'NewSales' in table 'Tkt Sales Tbl' cannot be found or may not be used in this expression". I have also tried using [Sum of NewSales] in the formula.

=CALCULATE(sum('Tkt Sales Tbl'[SAL_SUB_TOT]),SamePeriodLastYear('DtTbl'[Date]))

Any help would be greatly appreciated.

Thank you,
Valerie
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I resolved this issue. I am posting the formula below in case this might be of help to someone with a similar problem.

=CALCULATE(sum('Tkt Sales Tbl'[SAL_SUB_TOT])-PSTktLinTbl[Sum of EXT_PRC],SAMEPERIODLASTYEAR(DatesMTD(DtTbl[Date])))

Valerie
 
Upvote 0

Forum statistics

Threads
1,224,109
Messages
6,176,411
Members
452,728
Latest member
mihael546

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