Math calculation between rows

Next time you hit one of those cases, share it here and we’ll see if we can help with a way.
When you have multiple conditions or need to do a combination of AND/OR, generally the way is to work backwards and eliminate all the failing conditions first. One important thing to be aware of is that the if-then-else column will return as soon as it meets a matching condition, and you can take advantage of that.

For example, let’s say you want to express the following logic in an if-then-else column:

  • If A is true AND (B > 10 OR C > 10), then true

At first glance you might think the above isn’t possible, but it’s actually quite simple. It’s just a matter of reversing the test for A, and short circuiting the flow if it doesn’t pass. So…

  • If A is not checked, then null
  • If B is greater than 10, then true
  • If C is greater than 10, then true

Which gives:

The above approach won’t work for all cases, but it will work for many.
All that said - yes, it could be better. And you’re not the first one to have mentioned that.

3 Likes