Hello everyone,
Trying to come up with a formula using Chat GPT (and some tweaking) to create a formula field type that displays a subscription's (record) amount in a cell based on budget status and the payment schedule.
I want to create a formula that checks the following conditions:
- The Payment Schedule is "Annually."
- And one of the following is met:
- a. Budget Status is "Projected" and Renewal Date is within the specified range.
- b. Budget Status is "Actual" and Purchase Date is within the specified range.
If these 2 conditions are met, it displays the {Subscription Amount}. If none of the conditions are met, it will display "Conditions not met".
Here's the code:
IF(
AND(
{Payment Schedule} = "Annually",
OR(
AND(
{Budget Status} = "Projected",
{Renewal Date} > DATETIME_PARSE("2023-01-01"),
{Renewal Date} < DATETIME_PARSE("2023-02-01")
),
AND(
{Budget Status} = "Actual",
{Purchase Date} > DATETIME_PARSE("2023-01-01"),
{Purchase Date} < DATETIME_PARSE("2023-02-01")
)
)
),
{Subscription Amount},
"Conditions not met"
)
I keep getting the Conditions not met message even tho one of my records matches the conditions:
Can someone please help me figure it out?
Thanks 🙂