Writing formulas

Plan requirement

Subscription Suite Professional or higher, Explore Professional or higher
Access Admin

The formula language, the parts of it you actually need, and the four mistakes that account for most failures.

What you need

  • Conditions: if this then that, otherwise something else.
  • Comparisons: equals, greater than, contains.
  • Combining: and, or, not.
  • Arithmetic and a rounding function.
  • Date parts, to pull the month or the weekday out of a date.

That covers nearly every calculation a support team needs.

Mistake one: no else

A condition with no fallback leaves everything unmatched as blank. Blanks vanish from grouped reports, so the total quietly stops matching.

Mistake two: conditions in the wrong order

The first matching condition wins. A broad condition placed before a narrow one absorbs everything, and the narrow one never fires.

Order from most specific to most general.

Mistake three: comparing different things

A text value compared with a number, or a date compared with text. This produces a blank rather than an error, which makes it hard to spot.

Mistake four: labels instead of values

Writing the displayed label where the stored value is what gets compared. It looks right and matches nothing.

Build it in pieces

One condition, tested. Then the second. A formula with five conditions written in one go and returning blanks gives you nowhere to start.

Leave a comment

What this is for and who asked for it. The formula shows what it does; nothing shows why, and that is what the next person needs.

See also

Was this article helpful?

0

Still stuck?

Our support team will take a look with you.

Comments

0 comments

Article is closed for comments.