Rollup on condition?!

I want to create a conditional rollup field that only calcualtes the sum of values that are marked as Completed (so there’s a column with a checkbox - I only want to calcualte the totals if the row has that checkbox selected with a tick) - Makes sense?

How do I do that? I know I can do that in Excel right? Can I do it in AirTable?

Hi @Kosta_Kondratenko,

The way to do so is make an IF statement in the original table and you can then rollup the answer to the IF statement.

However, if you rollup the checkbox with a Sum value, it should give you your required data.

BR,
Mo

1 Like

Thanks but ht eissue is that every value is going to be different so I can’t just sum on the checkbox. I’ve never tried if - so you’re saying I could have a column in the original table that will have a value from the column over ONLY if the checkbox at the end is checked?

Hi,

I thought you wanted to count not sum the values. To sum the values you can use the IF formula

IF(Checkbox=1,Value,0)

You can then rollup this field.

BR,
Mo

If you want more background on Mohamed’s answer, try reading the support article on conditional rollups.

You create a new formula field in the table with the values: IF({completed}, {value}) Then you create a rollup field based on the new formula field.

Yep that’s the way to do it - smart. And I can hide that field too.

I fcking love AirTable. This sht is miraculous - does exactly what I needed it todo. The only thing is no point having those curly braces { } etc, that just complicates things and doesn’t pass the parser. You just do:

IF(Field1 = 1, Field 2)

That’s it, works like a charm for me :slight_smile:

Where F

1 Like

Hi folks! We’ve just introduced a feature that should hopefully make these kinds of workflows easier in the future. You can now set custom filter conditions on lookup, rollup, and count fields from within the field customization menu, so that it will only show the specific records you’re interested in. You can learn more from our announcement post:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.