↙️

Calculation Formula Syntax

Master Tag
Tips & Tricks
Created
Feb 19, 2020 01:35 PM
Usage
Multiply
Subtract
Add
Web Tags
Database
Basic
Formula
Alternatives
Cover
↙️
In the following tutorial, I'm going to explain different types of formula syntax for calculations in Notion. There is no one way to write a formula, but there are wrong ways. I'm going to show you the anatomy of mathematic functions, what breaks a formula, how to simplify syntax and a few examples of formula functions first-time Notion users may be inclined to use.

Basic Syntax for Calculations

Calculations work like algebraic expressions, whereby the order of commands must arrange in a hierarchy. For those unfamiliar with spreadsheets or haven't applied math in a while, writing down calculations as expressions first can help with transferring into a table formula. For example ...
→ we want to add total revenue from 15% Discount sales to full-price sales then add Register Balance to return the amount in Register Close for the end of the day.
Calculation Syntax
Product
Price
Sold
Register Balance
15% Discounts
Register Close
$30.00
13
2
$60.00
8
1
$35.00
7
2
→ Math: a(b-d) + d(a-(a*.15)) + c = x
→ Notion Formula: multiply(prop("Price"), prop("Sold") - prop("15% Discounts")) + multiply(prop("15% Discounts"), prop("Price") - prop("Price") * .15) + prop("Register Balance")
↙️
Syntax for add, subtract, divide, multiply: Syntax 1 → 3 + 4 = 7 Syntax 2 → add(1, 3) == 4
 
Broken Down:
  • a(b-d) → multiply(prop("Price"), prop("Sold") - prop("15% Discounts"))
  • + d(a-(a*.15)) → + multiply(prop("15% Discounts"), prop("Price") - prop("Price") * .15)
  • + c → + prop("Register Balance")

Alternate Syntax

If you're having a hard time visualizing the above syntax, this one works too ...
→ Notion Formula: prop("Price") * (prop("Sold") - prop("15% Discounts")) + prop("15% Discounts") * (prop("Price") - (prop("Price") * .15)) + prop("Register Balance")
Broken Down:
  • a(b-d) → prop("Price") * (prop("Sold") - prop("15% Discounts"))
  • + d(a-(a*.15)) → + prop("15% Discounts") * (prop("Price") - (prop("Price") * .15))
  • + c → + prop("Register Balance")