IF columns can have multiple conditions if you change your thinking a bit and try to think backwards by eliminating all the false conditions first. The IF column structure is limiting, but a lot of times you can work around it with some creative thinking.
As for rollups, you can also consider creating template columns that join several columns together, then use that template to create a relation, then point a rollup column to that relation instead of the entire table.
This may be because you are trying to do a rollup against an array. If your Lookup is against an entire table, then it is definitely an array. If your lookup is against a multiple relation, then it’s still an array. If your lookup is against a single relation, then it should be a single value that you can then use with a rollup.
If you share a screenshot of your data and what you are trying to accomplish, I’m sure we can come up with a working solution.
There’s a few ways to do it, but I would probably suggest this:
Create a template column that joins your ‘Paid For’ and ‘is Deleted’ columns.
Create a multiple Relation column that links that template column back to itself.
Create a Rollup column that sums the Amount from the relation.
If you want, you can then add an IF column that only returns that rollup value if ‘is Deleted’ is not true and it matches the user. This is the backwards thinking I was referring to.
IF 'Paid For' is not User A Then 0
ElseIF 'is Deleted' is true Then 0
Else Rollup Amount
Another variation would be:
Create a multiple relation that links the ‘Paid For’ column back to itself.
Then create an IF column that returns the amount or zero based on the is deleted value. If true then zero…else amount.
Then use a rollup column against the relation that sums the IF column amount.
Some advice when you use booleans, it’s better to check for true or not true, to also account for times that the column value could be empty. Checking for false can get you into trouble if you have the potential for a boolean column to be empty.
But let’s complicate the case!
Imagine now we want to have the Total (Sum) associated to all Q1s no matter the year (2019/2020/2021-Q1) with “Expired=True”, so the JS code would be:
if ((p1=="2019-Q1" || p1=="2020-Q1" || p1=="2021-Q1") && p2==true)
return p3