You need to sign in to do that
Don't have an account?
Formula for returning Days since Last Activity?
Hi All,
This is probably a really noob question, but I'm just getting my head around things.
I have created a formula field called DaysSinceLastActivity, which does this:
ROUND(TODAY()-LastActivityDate, 0)
This returns an integer number for days between today and the LastActivityDate.
The problem I am having is that if my guys put in reminders - activities to contact a lead at a particular point in the future, my "DaysSince" field starts returning a negative number: it subtracts (Activity Due Date) from (Today).
Is there a way to get this formula to ignore future dates altogether, and roll with LastActivityDate's that are in the past only?
I thought about having it return 0 if the number is negative, but that is basically wrong too.
Ideas?
Thanks in advance!
Nick
Nick,
I had a similar issue, but I went the route of having the formula display 0. At the end of the day, I am looking for any lead that hasn't had any activity logged against it, during the last 30 days. Not sure if this option will work for you, but here is the formula I used.
max(IF(NOT(ISNULL(LastActivityDate)),TODAY() - LastActivityDate,NOW()- CreatedDate ),0)
-Bermy
Thanks a lot Bermy, it probably does make more sense to have that 0 as a ceiling (or floor?) for the value. Annoying though the formula cant be written to ignore future dates though. Sigh.
Is there a way to inclue the current date in the code? It doesn't seem to work on activities created today.