You need to sign in to do that
Don't have an account?
Denise Meinershagen
Rolling 12 month formula field
This field should look at the month and year of deadline__c field (date field). Compare it to the current month/year. If it's within the next 12 months, then 'yes', if not then 'no.
For example: today is 12/20/2016. So, December 2016. The deadline on a record is 1/30/2017. So January 2017. This is within the next 12 months, so it should return a value of 'yes'. If the deadline on a record was 1/15/2018, the value would be 'no' because that month/year is more than 12 months from the current month/year.
The formula that I created isn't working as expected because it factors in the date of the month. Just need it to look at month/year. Here is the formula: IF( Deadline__c >= TODAY() + 365, "Yes", "No")
For example: today is 12/20/2016. So, December 2016. The deadline on a record is 1/30/2017. So January 2017. This is within the next 12 months, so it should return a value of 'yes'. If the deadline on a record was 1/15/2018, the value would be 'no' because that month/year is more than 12 months from the current month/year.
The formula that I created isn't working as expected because it factors in the date of the month. Just need it to look at month/year. Here is the formula: IF( Deadline__c >= TODAY() + 365, "Yes", "No")
You need to create a formula field of the Type TEXT with the below formula. That should work for you.
Kindly mark it as an answer if that works for you !
All Answers
What I did was create a new date using just the year and month off the deadline__c field and then put the day of the month as the 1st of the month:
Then I just compared the 2 using the same thing you had above for todays date:
The only other thing I changed was the True and False return text. Based on your formula you might want the No and Yes switched.
My final output looked like this:
You could use the same DATE function on todays date in order to keep the day of the month the same:
The end outcome looking like:
I hope this helps.
Have a happy holidays!
You need to create a formula field of the Type TEXT with the below formula. That should work for you.
Kindly mark it as an answer if that works for you !
IF(
(
12*(YEAR(deadline__c) - YEAR(TODAY())) +
(MONTH(deadline__c) - MONTH(TODAY()))
) <= 12,
"Yes",
"No"
)