You need to sign in to do that
Don't have an account?

How do I use this_week, last_week, etc in calculated fields?
I'm trying to get totals of opportunity amounts using "this week", "last week", "n weeks ago" in new custom fields, and then roll up the totals in summary reports. However, I get errors saying these don't exist, either with the underscore or without. How can I use them in calculated fields?
A typical use case would be:
IF(CloseDate = Last_Week,Amount,0) or IF(CloseDate = 3 weeks ago,Amount,0)
For me, TODAY() and Now() work, but not other literals.
Guidance, please...
I am not sure they are present or can be used in Formula field. You can use following link for possible function whichs can be use in building formula field.
https://na1.salesforce.com/help/doc/en/salesforce_formulas_cheatsheet.pdf
Checkout Examples of advance formula field on following link, may give you solution
http://www.salesforce.com/us/developer/docs/usefulFormulaFields/index.htm
THIS_WEEK :- Starts 00:00:00 on the most recent first day of the week before the current day and continues for seven full days. Your locale determines the first day of the week.
LAST_WEEK:- Starts 00:00:00 on the first day of the week before the most recent first day of the week and continues for seven full days. Your locale determines the first day of the week.
if you fond this useful then, PLEASE MARK AS A BEST ANSWER!!
Regards
Mukesh