function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ro ValiaoRo Valiao 

Show "this month" in a formula

Hey guys, I am stuck on this formula, maybe you can help...I am trying to say, if the close date is not blank and if the close date is this month, then return MRR.

Check it out:
IF(AND(NOT(ISBLANK(CloseDate)),CloseDate=MONTH(today())),MRR__c , null)

I am getting this error "Error: Incorrect parameter type for operator '='. Expected Date, received Number"
.
I am unsure on how to show a date for "this month". Any ideas?
andy81andy81
Hi Ro Valiao
Hope this helps out for you. Hit like if you are able to solve your issue so that i would be a future reference to others

IF(AND(NOT(ISBLANK(CloseDate)),MONTH(CloseDate)=Month(today())),MRR__c , null)
surasura
try below formula .

yo do not need to check for blank becuase if close date is blank 
MONTH(CloseDate)=MONTH(today()) and 
YEAR(CloseDate)=YEAR(today()) will be false
 
IF(AND(  YEAR(CloseDate)=YEAR(today())   ,   MONTH(CloseDate)=MONTH(today())   ),MRR__c , null)
Ro ValiaoRo Valiao
Incredibly helpful. Thanks guys!