Help

Re: Calculate rollup values against another field

2071 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_Lee
4 - Data Explorer
4 - Data Explorer

Calculate lookup values against a calculated column and then sum.

Example:
Lookup results * calculated_column
14,15,17 * 9

SUM((14 * 9)+(15 * 9)+(17 * 9))

How can I do this?

8 Replies 8

It is a bit hard to tell what you want without names of fields, but I’m guessing that you have three lookup values and want to multiply them times a value in a fourth field, and store the final product in a fifth field.

You can add without using the SUM . Also use parenthesis to control the order of operations.

({lookup1} + {lookup2} + {lookup3}) * 9

If this isn’t what you want, try looking at the formula field reference.

Hi Airtable,I want it to take the lookup field values and multiply by a field.

array =14,15,25

14*field

15*field

25*field

Then sum results of this.

Is the array in a rollup or lookup?

If the array is in a lookup, create a rollup instead.

Then try this formula in the rollup:

SUM(values) * {field}

Although this formula calculates the sum first, you get the same result according to the distributive property.

(14 * field) + (15 * field) + (25 * field) = (14 + 15 + 25) * field

I verified the total should be 288 as you stated.

This is what I am getting.

9*32=272

{TOT HRS}*{LABOR-CST1}
and LABOR-CST1 comes from the function SUM({TECH-RATE})

9 * 32 most certainly isn’t 272.

Can you check how many decimal points you are displaying for {TOT HRS}, {LABOR-CST1}, and any other fields feeding into the calculations? It could be that the formula for either one is rounding the number to the nearest integer for display purposes, but using a different number in the actual calculations.

I still haven’t been able to resolve this issue.

I’m sorry that you are still having trouble with this issue.
It is difficult for us to help without more information.

To echo @kuovonne, there needs to be a lot more detail in your description of the problem in order for us to provide meaningful assistance. Please describe in great detail:

  • What tables are involved in this setup
  • What fields are involved, including types and sample data
  • The specific formulas in any formula fields, and examples of the data being generated by them

It’s generally better to provide too much information than not enough.