Calculation with Conditions

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Linda
Posts: 17
Joined: Tue Oct 10, 2017 12:44 pm

Calculation with Conditions

Post by Linda » Wed Aug 21, 2002 12:44 pm

I^m trying to calculate the volume for our Life insurance benefit per employee. Volume is the value of the benefit if paid out to the employee.____Condition 1: maximum benefit is 300,000__Condition 2: benefit is discounted for ages 65 and up____= 2 x base salary, maximum at $300,000__if employee age is =>65, but < 70, multiply by 35%;__if employee age is =>70, but < 75, multiply by 60%; __if employee age is =>75, multiply by 75% ____I have tried various approaches using IIF and CASE without success. I^m hoping a fresh pair of eyes can point me in the right direction.____Any/all suggestions welcome!

Thomas_Freitas_(Guest)
Posts: 123
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Calculation with Conditions

Post by Thomas_Freitas_(Guest) » Wed Aug 21, 2002 1:20 pm

Condition 1: maximum benefit is 300,000__Condition 2: benefit is discounted for ages 65 and up____ = 2 x base salary, maximum at $300,000__ if employee age is =>65, but < 70, multiply by 35%;__ if employee age is =>70, but < 75, multiply by 60%; __ if employee age is =>75, multiply by 75% ____I would put in two calculation:____1. m_one = iif(2*base > 300000,300000,2*base)____2. m_two = m_one * iif(age >= 65 .and. age < 70,.35,__ iif(age >= 70 .and. age < 75, .60),.75)____My () may be in the wrong places since I have not tried it with a file, but I^m sure you get the picture..____

freitas
Posts: 68
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Calculation with Conditions

Post by freitas » Wed Aug 21, 2002 1:34 pm

I forgot to put () around the iif statement which makes those calculation work before it multiplies the m_one results.______2. m_two = m_one * (iif(age >= 65 .and. age < 70,.35,__ iif(age >= 70 .and. age < 75, .60),.75))

Post Reply