Help

IF() Statement in Date Rollup Formula Giving me the 0's

Topic Labels: Formulas
225 4
cancel
Showing results for 
Search instead for 
Did you mean: 

Hey all!

Here’s my situation: I’m working on a table with multiple linked records, and I have a rollup that displays the MAX(values) of a linked date field.

Here’s my problem: I want said rollup field to display the date ONLY when another condition is met. When I use only MAX(values), it works as expected, but when I add IF(Condition,MAX(values),BLANK()) as below, it returns either a blank cell, or a zero.

Here’s what the rollup formula looks like:
Screen Shot 2022-05-20 at 2.07.12 PM

And this is the result I get:
Screen Shot 2022-05-20 at 2.12.09 PM

I know I could get around this by creating a separate column for the IF() statement, and another column to show the Final Study On-Platform only if the IF() statement is true, but that’s messy. Hoping for a cleaner solution as my base is already getting quite large.

Thanks!
Paul

4 Replies 4

Hi Paul. Just thinking about it, I’m kind of shocked it even produces what it does. It implies some sort of knowledge of the result of other rollup fields (at least to equivalency) inside a rollup field. I guess what I mean is why should one expect to know the result of other rollup fields inside another? Is there some expectation of precedence here, I wonder?

Sorry that I don’t have something constructive to add, I am just genuinely surprised by what Airtable produced (the zeros) in your example.

Do you know for sure that this is possible? Thanks!

Try using MAX(values) instead of MAX(). Also remove BLANK()

IF(
    {# On Platform} = {# Studies},
    MAX(values)
)

Hey @kuovonne,

I’d tried it with MAX(values) and MAX() in my testing, both yield the same results.

I In reading about the logic supported by the rollup fields they list AND and OR, but not IF, which makes me wonder if Airtable simple doesn’t support conditional logic in the formula section of Rollups. Which would be to your point @augmented, it might be that rollups aren’t aware of the state of other rollups. But this would seem odd behavior because formula’s ARE aware, so it would seem an odd distinction for the program to make.

i have successfully use IF in rollup fields, and other complex logic. Your rollup is clearly aware of the other fields because it only has a value for the records where the two numbers are equal.

What is the field type of the field that you are trying to roll up? Can you share a screen capture?

Labels