12 Replies Latest reply: Jun 21, 2018 9:44 AM by Jeremiah Bakerstull

I'm trying to add to values together based on selections made from [Entry Exit Provider Name].

If I just select 'LSS - FM Faith on 6th' the value returns 89.

If I select 'LSS - FM Faith on 6th'  and 'LSS - FM Nancy''s Place', the return value is 27K.

I expected the value to be 128. Need some help.

Formula

=Sum(If(Match([Entry Exit Provider Name],'LSS - FM Faith on 6th'),89,

If(Match([Entry Exit Provider Name],'LSS - FM Nancy''s Place'),39,0)))

Thanks

• ###### Re: If statement adding values

May be try this

=Sum({<[Entry Exit Provider Name] * = {'LSS - FM Faith on 6th'}>} 89) + Sum({<[Entry Exit Provider Name] * = {'LSS - FM Nancy''s Place'}>} 39)

• ###### Re: If statement adding values

=Sum(If(Match([Entry Exit Provider Name],'LSS - FM Faith on 6th'),89,

If(Match([Entry Exit Provider Name],'LSS - FM Nancy''s Place'),39,0)))

In the second if condition you have two single quote with in the data, so you need to protect those single quote to read correctly.

=Sum(If(Match([Entry Exit Provider Name],'LSS - FM Faith on 6th'),89,

If(Match([Entry Exit Provider Name],'LSS - FM Nancy''''s Place'),39,0)))

• ###### Re: If statement adding values

Sunny, the formula has an error

=Sum({<[Entry Exit Provider Name] * = {'LSS - FM Faith on 6th'}>} 89) + Sum({<[Entry Exit Provider Name] * = {'LSS - FM Nancy''s Place'}>} 39)

Rangam, the sum adds up to 23,585 using formula

=Sum(If(Match([Entry Exit Provider Name],'LSS - FM Faith on 6th'),89,

If(Match([Entry Exit Provider Name],'LSS - FM Nancy''''s Place'),39,0)))

• ###### Re: If statement adding values

=RangeSum(

Avg({<[Entry Exit Provider Name] *= {'LSS - FM Faith on 6th'}>} 89),

Avg({<[Entry Exit Provider Name] *= {'LSS - FM Nancy''s Place'}>} 39))

• ###### Re: If statement adding values

Thanks, the sum is showing as 23,585, may due to multiple records you had with same name.

Might be that was the reason Avg function worked for you

• ###### Re: If statement adding values

that worked

RangeSum(

Avg({<[Entry Exit Provider Name] *= {'LSS - FM Faith on 6th'}>} 89),

Avg({<[Entry Exit Provider Name] *= {'LSS - FM Nancy''s Place'}>} 39))

thank you!

• ###### Re: If statement adding values

Super

• ###### Re: If statement adding values

We can def. create an if statement also... but set analysis is better than if statement... do you really want to use if statement?

• ###### Re: If statement adding values

I believe the set analysis will be more flexible. Can conditions be added to it?

• ###### Re: If statement adding values

You sure can...

• ###### Re: If statement adding values

I just released that the formula is ignoring the programs that are selected in the  [Entry Exit Provider Name]  object.

What the formula is doing is adding all program values together. I just realized this after adding 72 additional programs to the formula.