if() and ifs() in Notion formulas

if(condition, then, else)

if(prop("Total") >= 50, "Free shipping", "Standard")

Compare with == (not =), !=, >, >=, <, <=. Combine with and, or, not. Note that not applies to the value right after it, before any comparison: use != or brackets, like not (a == b).

ifs(): many conditions, no nesting

ifs(
  prop("Score") >= 90, "A",
  prop("Score") >= 80, "B",
  prop("Score") >= 70, "C",
  "F"
)

Conditions are checked in order and the first true one wins, so put the strictest check first. The last value is the fallback when nothing matches. Leave it out and ifs() returns empty.

Checking for blanks

if(empty(prop("Owner")), "Unassigned", prop("Owner"))

Common errors

You wroteFix
if(prop("A") = 1, …)Use == to compare.
“Done” (curly quotes from a doc)Retype as straight quotes "Done".
ifs(prop("Score") >= 90, "A", prop("Score") >= 80, "B") shows nothing for low scoresAdd a last fallback value: …, "F"). Without one, ifs() returns empty.
not prop("A") == "x"not applies before ==, so write prop("A") != "x" or not (prop("A") == "x").
Both branches return different typesMake both text (or both numbers).

Practice it