You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Calculation based on multiple conditions

posted on September 27, 2021

I'm trying to figure out how to perform a calculation based on multiple conditions. I have a pre-populated field from a lookup (Employee_Hourly_Rate) that I would like to adjust based on selections in two different sets of radio buttons (Minimum_Hours and Overtime_Type). The field where the calculation takes place is Calculated_Hourly_Rate.

What I want to accomplish is:

If Minimum_Hours=0 (note: Minimum_Hours can be 0, 2, or 3), then calculate Calculated_Hourly_Rate based on these conditions:
Overtime_Type=OT, multiply Employee_Hourly_Rate by 1.5
OR
Overtime_Type=CT, multiply Employee_Hourly_Rate by 1.5
OR/ELSE
Overtime_Type=STR, multiply Employee_Hourly_Rate by 1


If I were only trying to accomplish the overtime piece I would do something like this:

=MULT(Employee_Hourly_Rate,IF(Overtime_Type="OT",1.5,IF(Overtime_Type="CT",1.5,1)))

I'm just not sure how to add the minimum hours piece.

Thank you.

0 0
replied on September 27, 2021

Just guessing based on what you said...

=IF(Minimum_Hours>Hours,1,MULT(Employee_Hourly_Rate,IF(Overtime_Type="OT",1.5,IF(Overtime_Type="CT",1.5,1))))

This would be saying that you had a field Hours that needed to be more than the minimum hours for the person to receive the over time and that it would be straight time if that minimum hours was not met.

0 0
replied on September 27, 2021

Thank you for the response, and I see that further clarification is needed.

Depending on the circumstances of the overtime, if 2 or 3 Minimum_Hours is selected by the timekeeper, the hourly rate stays the same. If Minimum_Hours=0 then the overtime calculation would occur.

Based on your response, I tried the calculation below in the but it did not work.

=IF(Minimum_Hours=0,MULT(Employee_Hourly_Rate,IF(Overtime_Type="OT",1.5,IF(Overtime_Type="CT",1.5,1))))

0 0
replied on September 27, 2021

Your first if only has 2 parameters, the condition and the value if true. You also need a value if false.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.