2 Replies Latest reply on Apr 2, 2018 11:41 AM by Jim Dehner

# Basic calculation help!

I feel like this should be easy, but I'm not having any luck. Here is my calculation:

IF [Tow Events]>0

AND([Miles Tw Calc] >5)

THEN 5

ELSE [Miles Tw Calc]

END

I want anything with tow events >0 and miles >5 to have only 5 in my column. Everything else should look at field miles tw calc. This means that I should only see 5's and numbers below 5's in this column, but it' not working?

I appreciate any help!

Thanks!

• ###### 1. Re: Basic calculation help!

Hi Sheryl -

assuming all the data is from a single source  you can try

IF  Sum([Tow Events])>0

AND  Sum(([Miles Tw Calc] )>5)

THEN 5

ELSE sum([Miles Tw Calc]

END

• ###### 2. Re: Basic calculation help!

BTW that Sum(tow events) may be count or countd rather than sum

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.