Skip to main content

Difference between A & B fields, but blank if B has no value

  • February 26, 2019
  • 4 replies
  • 25 views

Hello! I’ve been struggling with a formula and am hoping for some help.

I have an $Invoice field, a $Paid field, and I’d like to have a Difference field (i.e., show $0 if a client paid their invoice in full, or show the balance due if an invoice is short-paid. I would also like the difference field to be blank if there is nothing in the $Paid field… that’s where I’m struggling.

Any suggestions?

4 replies

Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • February 26, 2019

Try this:

IF({$Paid}=BLANK(), BLANK(), {$Invoice} - {$Paid})

  • Author
  • New Participant
  • 1 reply
  • February 26, 2019

That worked! Thanks so much!


Forum|alt.badge.img+5
  • Inspiring
  • 1386 replies
  • February 28, 2019

That worked! Thanks so much!


IF({$Paid},{$Invoice}-{$Paid}) will work as well. It takes advantage of a couple of Airtable shortcuts:

  • IF({Field},...) is an implicit test for {Field} != BLANK().
  • An IF() statement whose test evaluates to false but lacks a second (‘ELSE’) branch returns BLANK().

Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • February 28, 2019

IF({$Paid},{$Invoice}-{$Paid}) will work as well. It takes advantage of a couple of Airtable shortcuts:

  • IF({Field},...) is an implicit test for {Field} != BLANK().
  • An IF() statement whose test evaluates to false but lacks a second (‘ELSE’) branch returns BLANK().

Great points. I discovered those shortcuts after writing that comment, but didn’t think to backtrack and update it.