Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
Chicky

Half Year Custom Formula Field

I would like to create a field so that I can sort myopportunities by twohalf year categories, ratherthan 4 Quarters:

CloseDate from 1/1/2009 to 30/6/2009 = H109

CloseDate from 1/7/2009 to 31/12/2009 = H209

Can you help?

Jakester

if( month(CloseDate)<7 ,"H1"+right(text(year(CloseDate)),2) ,"H2"+right(text(year(CloseDate)),2) )

Jakester

This should be really easy. Untested, but it would be something like:

if( month(closedate)<7,"H1"+text(right(year(closedate),2)) ,"H2"+text(right(year(closedate),2)) )

Chicky

Thanks so much for trying to help.

The error messgae that comes up is:

"Error: Incorrect parameter for function right(). Expected Text, received Number"

Any suggestions?

Jakester

if( month(closedate)<7,"H1"+right(text(year(closedate),2))

,"H2"+right(text(year(closedate),2))

)

How bout that?

Chicky

Still not working, sorry;

Error: Incorrect number of parameters for function TEXT(). Expected 1, received 2

Jakester

if( month(CloseDate)<7 ,"H1"+right(text(year(CloseDate)),2) ,"H2"+right(text(year(CloseDate)),2) )

This was selected as the best answer
Chicky
Thank you so much!
Jakester
You're welcome! Please take a second to mark that last post as the Solution so others can find it easily.