Trying to get Last years sales as a calculated field

seancsn

New Member
Joined
Feb 12, 2015
Messages
18
I have used the following formulas without success, with the error "Semantic Error: The value for Monthdate cannot be determined...."

Last Years Sales:=CALCULATE([Total Sales]),DATEADD([Monthdate],-1,Year))

Last Years Sales:=CALCULATE([Total Sales]),SAMEPERIODLASTYEAR([Monthdate])

The dates contained within Monthdate are of the format day/month/year. There are only 13 dates to represent the months data ie. 1/4/14, 1/5/14 etc but they are repeated a number of times for each reps sales.

Please could you advise what I am doing wrong?

Thanks in advance

Sean
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi Sean,
Time intelligence functions need a contingeous date table to be connected to your Sales table.
In your formula you then actually should reference the date columnn from that date table and not from your sales table.
Best thing even to hide all your transaction tables' date columns from client tools as soon as you've connected them with your date table.
hth, Imke

Details:
The Ultimate Date Table « PowerPivotPro
Calendar Tables: Not Just for Formulas. Use Them on Your Pivots Too! « PowerPivotPro
 
Upvote 0

Forum statistics

Threads
1,224,074
Messages
6,176,223
Members
452,715
Latest member
DebbieCox

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