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

Month to Date Formula Using Opportunity Close Date
IF( CloseDate <= TODAY() , 1,0) almost gets me where I want to go.
I'm trying to create a true or false (1 or 0) result to help me determine revenue this month to date. How do I limit the above results to THIS_MONTH in a formula field?
IF( AND( CloseDate <= TODAY(), MONTH(CloseDate) = MONTH(TODAY()), YEAR(CloseDate) = YEAR(TODAY())), 1,0)
All Answers
You probably have to parse out the Month and Year of you date field using
MONTH(CloseDate)
YEAR(Close Date)
MONTH(Today())
YEAR(Today())
This one should work:
IF(
AND(
CloseDate <= TODAY(),
MONTH(CloseDate) = MONTH(TODAY())
)
,
1,0)
This is the sort of formula I was talking about (don't bother with a Workflow Rule, it was late and I wasn't thinking right).
You have to also evaluate the CloseDate YEAR and Current YEAR otherwise Opportunities that closed in the same month but in a previous year will be incorrectly flagged.
IF(
AND(
MONTH(CloseDate) = MONTH(TODAY()),
YEAR(CloseDate) = YEAR(TODAY())), 1,0)
IF( AND( CloseDate <= TODAY(), MONTH(CloseDate) = MONTH(TODAY()), YEAR(CloseDate) = YEAR(TODAY())), 1,0)
Thanks for adding the YEAR...
Werner