# Re: IF Field = "Name" then Calculate Various Hourly Rates from different table

Solved
668 0
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

Hi there!

Trying to create a formula that pulls various hourly rate information from another table and calculates the hours x hourly rates into a grand total field. Additionally, rates vary depending on the employee selected, so once a name is selected, the formula will pull their respective rates from the other table and start the calculation. I believe this may require a roll up field as well, but not sure where that falls in the flow.

Here’s a screen shot of the other table with various \$\$\$ rates

Here’s my main timesheet table where you’ll see a number of hour totals (Reg., OT, and 2xOT).

Again, once I choose a name (People) I want to calculate those totals with their respective rates in the Total Compensation field.

Really stuck on this one!

Thanks!

1 Solution

Accepted Solutions
18 - Pluto

A rollup field is how you pull the data for a linked record. The formula itself can’t do that. For example, to bring over the hourly rate, add a rollup field named `{Hourly}` that uses the `{People}` linked record field, retrieving the `{Hourly}` field value, and using `SUM(values)` as the aggregation formula. You could then use the value from that `{Hourly}` rollup in other formulas. If you need other values for an employee, add rollup fields to bring those over as well.

2 Replies 2
18 - Pluto

A rollup field is how you pull the data for a linked record. The formula itself can’t do that. For example, to bring over the hourly rate, add a rollup field named `{Hourly}` that uses the `{People}` linked record field, retrieving the `{Hourly}` field value, and using `SUM(values)` as the aggregation formula. You could then use the value from that `{Hourly}` rollup in other formulas. If you need other values for an employee, add rollup fields to bring those over as well.

5 - Automation Enthusiast

Thank you Justin! Appreciate the help!

DB