You need to sign in to do that
Don't have an account?
dajerz
Month over month syntax error
Hi, I'm trying to put together a month over month and year over year comparison report. I have the formula fields in which to achieve this however I am encountering a syntax problem with CloseData (see below). Sf keeps telling me that there is no such field as CloseDate. However Close Date is a standard field in Opportunities.
Any help would be appreciated, thanks.
CASE( MONTH ( {!CloseDate} ) , 1, "01 - January", 2, "02 - February", 3, "03 - March", 4, "04 - April", 5, "05 - May", 6, "06 - June", 7, "07 - July", 8, "08 - August", 9, "09 - September", 10, "10 - October", 11, "11 - November", "12 - December")
David
Any help would be appreciated, thanks.
CASE( MONTH ( {!CloseDate} ) , 1, "01 - January", 2, "02 - February", 3, "03 - March", 4, "04 - April", 5, "05 - May", 6, "06 - June", 7, "07 - July", 8, "08 - August", 9, "09 - September", 10, "10 - October", 11, "11 - November", "12 - December")
David
Hi,
It works perfectly for me.
You could try changing {!CloseDate} to CloseDate.. and also make sure that the formula return type is Text.
CASE( MONTH ( CloseDate ) , 1, "01 - January", 2, "02 - February", 3, "03 - March", 4, "04 - April", 5, "05 - May", 6, "06 - June", 7, "07 - July", 8, "08 - August", 9, "09 - September", 10, "10 - October", 11, "11 - November", "12 - December")
Thanks,
Kaushik
Thanks for the tip, it worked for the text formula field. However I am encountering the same syntax problem in creating the currency formula field, i.e., Error: Field CloseDate does not exist. Check spelling. Any thoughts?
Thanks!
David
Sorry I couldn't get you.Why do you want to use a currency field for a month?
Kaushik
Well to answer your question, the original instructions discussed creating two currency formula fields:
B) Create 2 currency formula fields:
Current Year Amount = IF( YEAR( {!CloseDate} ) = YEAR(TODAY()) , {!Amount} , 0 )
Previous Year Amount = IF( YEAR( {!CloseDate} ) = YEAR(TODAY()) - 1 , {!Amount} , 0 )
That is why I created a currency formula. Are you saying that these formulas should be text formulas as well?
David
Ok here is where my "newbieness" to SF comes in. I did not use the merge fields -- which ones should be used?
/d
In formula fields, the syntax is different from merge fields. It is not {!CloseDate} but just CloseDate. You formula should read:
IF( YEAR( CloseDate ) = YEAR(TODAY()) , Amount , 0 ).
Keeping them as currency formulas is OK.