I need help with an Expression

I canโ€™t figure out what the issue is with my expression:

IF(AND([2nd Calculation]>0, [UTC_Date]>UTCNOW(),([Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)[2nd 2>])), IF(AND([1st Calculation]=0, [UTC_Date]>UTCNOW(), 0.00+[Saving_Adjust],([Saving_Adjust]+[1st #1])+(([1st Calculation]-1)[1st 2>]))))

Thanks for the help

Solved Solved
0 10 173
1 ACCEPTED SOLUTION

I figured it out

Thanks for all the help

View solution in original post

10 REPLIES 10

Hi @Stephen_Smith
What errors do you get when you test it?

This is the error:

Condition AND(([2nd Calculation] > 0), ([UTC_Date] > UTCNOW()), (([Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)*[2nd 2>]))) has an invalid structure: subexpressions must be Yes/No conditions

You miss a + hereโ€ฆ
[Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)
+(missing)
[2nd 2>]

Try this:
IF(
AND(
[2nd Calculation]>0, [UTC_Date]>UTCNOW(),
([Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)+[2nd 2>])
),
IF(AND([1st Calculation]=0, [UTC_Date]>UTCNOW(), 0.00+[Saving_Adjust],([Saving_Adjust]+[1st #1])+(([1st Calculation]-1)+[1st 2>]))))

**Sorry somehow the โ€œ*โ€ was cut off the post.

IF(AND([2nd Calculation]>0, [UTC_Date]>UTCNOW(),([Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)[2nd 2>])), IF(AND([1st Calculation]=0, [UTC_Date]>UTCNOW(), 0.00+[Saving_Adjust],([Saving_Adjust]+[1st #1])+(([1st Calculation]-1)[1st 2>]))))

Yes I see the problem.
If you use a AND(โ€ฆ) this must return a yes/no result.
But you have AND(
[2nd Calculation]>0,
[UTC_Date]>UTCNOW(),
([Saving_Adjust]+[2nd #1])โ€ฆ

But ([Saving_Adjust]+[2nd #1])โ€ฆ is not a Y/N result.

Not sure what you want to do here, but as an example, this should work:
IFS(AND(
[2nd Calculation]>0,
[UTC_Date]>UTCNOW()),
([Saving_Adjust]+[2nd #1])+(([2nd Calculation]-1)[2nd 2>]),
AND(
[1st Calculation]=0,
[UTC_Date]>UTCNOW(),
0.00>[Saving_Adjust]),
([Saving_Adjust]+[1st #1])+(([1st Calculation]-1)
[1st 2>]))

I figured it out

Thanks for all the help

Top Labels in this Space