Help

Calculate if time is date time is between specific date

Topic Labels: Formulas
575 3
cancel
Showing results for 
Search instead for 
Did you mean: 
shasixz
4 - Data Explorer
4 - Data Explorer

I have a formula that calculates a 2.99% but since January 1 is 2.29%. Actual formula: ({Total due}-(2.99*{Total due})/100)+{Manual Rate}

I have a column: Date Booked

 
How can I modify the actual column named 2.99% to be calculated only if the Date Booked is before 12/31/2023. 
And a second one to calcula only if Date Booked is after 01/01/2024?
 
Any help, please?
3 Replies 3
shasixz
4 - Data Explorer
4 - Data Explorer

I am trying my best but is not working:

    IF(
    AND(
        IS_AFTER(
            {Date Booked},
            '1/1/2024'
            ),
    {Date Booked},
    ({Total due}-(2.29*{Total due})/100)+{Manual Rate},
        IS_BEFORE(
            {Date Booked},
            '12/31/2023'
            )
        ),
    {Date Booked},
    ({Total due}-(2.99*{Total due})/100)+{Manual Rate}
    )
shasixz
4 - Data Explorer
4 - Data Explorer

I am so desperate, I can not find a way to make it work. right now is only giving me the 2.29% result and the 2.99% is empty:

IF(
{Date Booked},
IF(
IS_AFTER(
{Date Booked},
DATETIME_PARSE(
'31/12/2023',
'DD/MM/YYYY'
)
),
({Total due}-(2.29*{Total due})/100)+{Manual Rate}),
IF(
IS_BEFORE(
{Date Booked},
DATETIME_PARSE(
'31/12/2023',
'DD/MM/YYYY'
)
),
({Total due}-(2.99*{Total due})/100)+{Manual Rate})
)

shasixz
4 - Data Explorer
4 - Data Explorer

Any help, please?