Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
SJ_16
Contributor II
Contributor II

Count Accounts using Today

Hi,

I need a calculate field 'New accounts this month' to have a calculations as follows:

if M_Date (formatted YYYY-MM-DD) = current month then 1 else 0

Any idea how to write the syntax for this please?

4 Replies
OmarBenSalem

count(distinct {<M_Date={">=$(=date(monthstart(Today(1)),'YYYY-MM-DD'))<=$(=date(monthend(Today(1)),'YYYY-MM-DD'))"}>} NewAccount)

arulsettu
Master III
Master III

maybe like this

if (Max(M_Date)=Date(Today(),'YYYY-MM-DD'),1,0)

SJ_16
Contributor II
Contributor II
Author

count(distinct {<M_Date={">=$(=date(monthstart(Today(1)),'YYYY-MM-DD'))<=$(=date(monthend(Today(1)),'YYYY-MM-DD'))"}>} NewAccount)


I get an error message confirming - Unrecognized symbol: {

timpoismans
Specialist
Specialist

Hi Steve

Try the following, with your fields of course:

Count({<Month={"$(=Month(Today()))"},Year={"$(=Year(Today()))"}>}distinct AccountID)