Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Formula to define No of months ahead

Topic Labels: Formulas
Solved
Jump to Solution
290 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi Everyone,

I was wondering if I can create a formula that gives me a certain number of months ahead instead of changing the filter from a certain date to date each month, sometimes we miss it, so I want to set up the filter to read from the formula

I want the formula to read from my ( Release Date ), this exiting month and 2 months ahead
like give me Feb, March, and April as true, so when I tell the filter to give only what is “true,” it will give me those 3 months, and it will automatically drop one and add another each beginning of a new month.

Thanks a lot
Ahmed Elagami

1 Solution

Accepted Solutions

There’s a good chance I misunderstood what it is you’re asking for, but the following formula will return “true” for all records where a given date is somewhere between the 1st of the current month (February 1) and the last day of two months forward (April 31):

IF(
   {Release Date}, 
   IF(
      AND(
         {Release Date} < DATEADD(DATEADD(DATETIME_FORMAT(TODAY(), 'YYYY/MM/01'), 3, 'months'), -1, 'day'), 
         {Release Date} >= DATETIME_PARSE(DATETIME_FORMAT(TODAY(), 'YYYY/MM/01'))
      ), 
      "true", 
      "false"
   )
)

See Solution in Thread

2 Replies 2

There’s a good chance I misunderstood what it is you’re asking for, but the following formula will return “true” for all records where a given date is somewhere between the 1st of the current month (February 1) and the last day of two months forward (April 31):

IF(
   {Release Date}, 
   IF(
      AND(
         {Release Date} < DATEADD(DATEADD(DATETIME_FORMAT(TODAY(), 'YYYY/MM/01'), 3, 'months'), -1, 'day'), 
         {Release Date} >= DATETIME_PARSE(DATETIME_FORMAT(TODAY(), 'YYYY/MM/01'))
      ), 
      "true", 
      "false"
   )
)

@Kamille_Parks Thanks for your help, that worked exactly the way I wanted, Appreciate your help Kamille.

My Best
Ahmed Elagami