Help

Combining formulas with dates

Topic Labels: Formulas
Solved
Jump to Solution
752 1
cancel
Showing results for 
Search instead for 
Did you mean: 
virtuallyaurora
4 - Data Explorer
4 - Data Explorer

Hello!

So i was wondering if it was possible to create a formula (or combine formulas) in order to use the data from one date field and add 7 days to it in another. and then filter it if the project status matches certain conditions.

I got the first part to work using: 

DATEADD({Project Date}, 7, "days"
which worked perfectly, 
 
but im not sure if its possible to then have it say "not needed" or even have it be blank if the project type matches certain conditions and still show the date if it matches other conditions!
 
I also tried this:
IF(
OR(
{Project Type} = "Wedding",
{Project Type} = "Elopement"
),
DATEADD({Project Date}, 7, "days"),
IF(
AND(
OR(
{Project Type} = "Couples",
{Project Type} = "Family"
),
"Not Needed",
"Not Needed"
)
)
)
 
which kinda worked but it only filled in the wedding date status and not of the other options.
 
Let me know if that makes sense and if you can help please 🙂
1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

Hello @virtuallyaurora ,

SWITCH() is more concise for simple multiple conditionals.

SWITCH({Project Type},
  "Wedding", DATETIME_FORMAT(DATEADD({Project Date}, 7, "days"),"YYYY/MM/DD"),
  "Elopement", DATETIME_FORMAT(DATEADD({Project Date}, 7, "days"),"YYYY/MM/DD"),
  "Couples", "Not Needed",
  "Family", "Not Needed",
  ""
)

 

See Solution in Thread

1 Reply 1
Sho
11 - Venus
11 - Venus

Hello @virtuallyaurora ,

SWITCH() is more concise for simple multiple conditionals.

SWITCH({Project Type},
  "Wedding", DATETIME_FORMAT(DATEADD({Project Date}, 7, "days"),"YYYY/MM/DD"),
  "Elopement", DATETIME_FORMAT(DATEADD({Project Date}, 7, "days"),"YYYY/MM/DD"),
  "Couples", "Not Needed",
  "Family", "Not Needed",
  ""
)