Notion Formulas

Adam Listek
Mar 8 · 15 min read · 108 views
Welcome to a reference guide to Notion Formulas. Hopefully you find this useful and please feel free to comment (Notion account needed) to make suggestions, updates or fixes needed.

Properties

To refer to a different field property, use the prop("Field Name") syntax.
prop("Name")
This will return, My Entry as shown in the example above.

Constants

There are a few available constants within the formulas:
e
The base of the natural logarithm. This is also known as Eulers Number or Napier's Constant. The value is 2.718281828459045.
So when would we use something like this?
  • Compound Interest
pi
The ratio of a circle's circumference to its diameter.
True
The example below is what is called a ternary operator:
true ? "yes" : "no" == "yes"
Note: A ternary operator is like below (also an if expression):
condition ? value if true : value if false
False
The example below is what is called a ternary operator:
false ? "yes" : "no" == "no"
Note: A ternary operator is like below (also an if expression):
condition ? value if true : value if false

Operators

Logic

  • if
    Switches between two options based on another value.
    Syntax
    boolean ? value : value
    if(boolean, value, value)
    Examples
    true ? 1 : -1 == 1
    if(false, "yes", "no") == "no"

Number

  • add
    Adds two numbers and returns their sum, or concatenates two strings.
    Syntax
    number + number
    text + text
    add(number, number)
    add(text, text)
    Examples
    3 + 4 = 7
    add(1, 3) == 4
    "add" + "text" == "addtext"
  • divide
    Divides two numbers and returns their quotient.
    Syntax
    number / number
    divide(number, number)
    Examples
    12 / 4 == 3
    divide(12, 3) == 4
  • mod
    Divides two numbers and returns their remainder.
    Syntax
    number % number
    mod(number, number)
    Examples
    7 % 5 == 2
    mod(3, 3) == 0
  • multiply
    Multiplies two numbers and returns their product.
    Syntax
    number * number
    multiply(number, number)
    Examples
    6 * 9 == 54
    multiply(2, 10) == 20
  • pow
    Returns base to the exponent power, that is, baseexponent.
    Syntax
    number ^ number
    pow(number, number)
    Examples
    5 ^ 3 == 125
    pow(2, 6) == 64
  • subtract
    Subtracts two numbers and returns their difference.
    Syntax
    number - number
    subtract(number, number)
    Examples
    3 - 1 == 2
    subtract(4, 5) == -1
  • unaryMinus
    Negates a number.
    Syntax
    - number
    unaryMinus(number)
    Examples
    -1 + 2 == 1
    unaryMinus(42) == -42
  • unaryPlus
    Converts its argument into a number.
    Syntax
    + value
    unaryPlus(value)
    Examples
    + "42" == 42
    unaryPlus(true) == 1

Conditional

  • and
    Returns the logical AND of its two arguments.
    Syntax
    boolean and boolean
    and(boolean, boolean)
    Examples
    true and false == false
    and(true, true) == true
  • equal
    Returns true if its arguments are equal, and false otherwise.
    Syntax
    value == value
    equal(value, value)
    Examples
    (3 * 5 == 15) == true
    equal(false, not true) == true
  • larger
    Returns true of the first argument is larger than the second.
    Syntax
    number > number
    date > date
    text > text
    boolean > boolean
    
    larger(number, number)
    larger(date, date)
    larger(text, text)
    larger(boolean, boolean)
    Examples
    5 > 3 == true
  • largerEq
    Returns true of the first argument is larger than or equal to than the second.
    Syntax
    number >= number
    date >= date
    text >= text
    boolean >= boolean
    
    largerEq(number, number)
    largerEq(date, date)
    largerEq(text, text)
    largerEq(boolean, boolean)
    Examples
    5 >= 3 == true
    4 >= 4 == true
  • not
    Returns the logical NOT of its argument.
    Syntax
    not boolean
    not(boolean)
    Examples
    not true == false
    not(false) == true
  • or
    Returns the logical OR of its two arguments.
    Syntax
    boolean or boolean
    or(boolean, boolean)
    Examples
    false or true == true
    or(false, false) == false
  • smaller
    Returns true of the first argument is smaller than the second.
    Syntax
    number < number
    date < date
    text < text
    boolean < boolean
    
    smaller(number, number)
    smaller(date, date)
    smaller(text, text)
    smaller(boolean, boolean)
    Examples
    10 < 8 == false
  • smallerEq
    Returns true of the first argument is smaller than or equal to than the second.
    Syntax
    number <= number
    date <= date
    text <= text
    boolean <= boolean
    
    smallerEq(number, number)
    smallerEq(date, date)
    smallerEq(text, text)
    smallerEq(boolean, boolean)
    Examples
    10 <= 8 == false
    8 <= 8 == true
  • unequal
    Returns false if its arguments are equal, and true otherwise.
    Syntax
    value != value
    unequal(value, value)
    Examples
    (6 * 9 != 42) == false
    (true != not false) == false

Functions

String
  • concat
    Concatenates its arguments and returns the result.
    Syntax
    concat(text...)
    Examples
    "dog" +"go" == "doggo"
    concat("dog", "go") == "doggo"
  • contains
    Returns true if the second argument is found in the first.
    Syntax
    contains(text, text)
    Examples
    contains("notion", "ion") == true
  • format
    Formats its argument as a string.
    Syntax
    format(value)
    Examples
    format(42) == "42"
    format(true) == "true"
    format(now()) == "Wed Dec 31 1969
  • join
    Inserts the first argument between the rest and returns their concatenation.
    Syntax
    join(text...)
    Examples
    join("-", "a", "b", "c") == "a-b
  • length
    Returns the length of a string.
    Syntax
    length(text)
    Examples
    length("Hello world") == 11
  • replace
    Replaces the first match of a regular expression with a new value.
    Syntax
    replace(number, text, text)
    replace(text, text, text)
    replace(boolean, text, text)
    Examples
    replace("1-2-3", "-", "!") == "1!2-3"
    replace("abcc abcccc", "abc{2,}", "!") == "! abcccc"
  • replaceAll
    Replaces all matches of a regular expression with a new value.
    Syntax
    replaceAll(number, text, text)
    replaceAll(text, text, text)
    replaceAll(boolean, text, text)
    Examples
    replaceAll("1-2-3", "-", "!") == "1!2!3"
    replaceAll("abcc abcccc", "abc{2,}", "!") == "! !"
  • slice
    Extracts a substring from a string from the start index (inclusively) to the end index (optional and exclusively).
    Syntax
    slice(text, number)
    slice(text, number, number)
    Examples
    slice("Hello world", 1, 5) == "ello"
    slice("notion", 3) == "ion"
  • test
    Tests if a string matches a regular expression.
    Syntax
    test(number, text)
    test(text, text)
    test(boolean, text)
    Examples
    test("1-2-3", "-") == true
Date
  • date
    Returns an integer number, between 1 and 31, corresponding to day of the month for the given.
    Syntax
    date(date)
    Examples
    date(now()) == 13
  • dateAdd
    Add to a date. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
    Syntax
    dateAdd(date, number, text)
    Examples
    dateAdd(date, amount, "years")
    dateAdd(date, amount, "quarters")
    dateAdd(date, amount, "months")
    dateAdd(date, amount, "weeks")
    dateAdd(date, amount, "days")
    dateAdd(date, amount, "hours")
    dateAdd(date, amount, "minutes")
    dateAdd(date, amount, "seconds")
    dateAdd(date, amount, "milliseconds")
  • dateBetween
    Returns the time between two dates. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
    Syntax
    dateBetween(date, date, text)
    Examples
    dateBetween(date, date2, "years")
    dateBetween(date, date2, "quarters")
    dateBetween(date, date2, "months")
    dateBetween(date, date2, "weeks")
    dateBetween(date, date2, "days")
    dateBetween(date, date2, "hours")
    dateBetween(date, date2, "minutes")
    dateBetween(date, date2, "seconds")
    dateBetween(date, date2, "milliseconds")
  • dateSubtract
    Subtract from a date. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
    Syntax
    dateSubtract(date, number, text)
    Examples
    dateSubtract(date, amount, "years")
    dateSubtract(date, amount, "quarters")
    dateSubtract(date, amount, "months")
    dateSubtract(date, amount, "weeks")
    dateSubtract(date, amount, "days")
    dateSubtract(date, amount, "hours")
    dateSubtract(date, amount, "minutes")
    dateSubtract(date, amount, "seconds")
    dateSubtract(date, amount, "milliseconds")
  • day
    Returns an integer number corresponding to the day of the week for the given date: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
    Syntax
    day(date)
    Examples
    day(now()) == 3
  • end
    Returns the end of a date range.
    Syntax
    end(date)
    Examples
    end(prop("Date")) == Feb 2, 1996
  • formatDate
    Format a date using the Moment standard time format string.
    Syntax
    formatDate(date, text)
    Examples
    formatDate(now(), "MMMM D YYYY, HH:mm") == March 30 2010, 12:00
    formatDate(now(), "YYYY/MM/DD, HH:mm") == 2010/03/30, 12:00
    formatDate(now(), "MM/DD/YYYY, HH:mm") == 03/30/2010, 12:00
    formatDate(now(), "HH:mm A") == 12:00 PM
    formatDate(now(), "M/D/YY") == 3/30/10
  • fromTimestamp
    Returns a date constructed from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
    Syntax
    fromTimestamp(number)
    Examples
    fromTimestamp(2000000000000) == Tue May 17 2033
  • hour
    Returns an integer number, between 0 and 23, corresponding to hour for the given date.
    Syntax
    hour(date)
    Examples
    hour(now()) == 17
  • minute
    Returns an integer number, between 0 and 59, corresponding to minutes in the given date.
    Syntax
    minute(date)
    Examples
    minute(now()) == 45
  • month
    Returns an integer number, between 0 and 11, corresponding to month in the given date according to local time. 0 corresponds to January, 1 to February, and so on.
    Syntax
    month(date)
    Examples
    month(now()) == 11
  • now
    Returns the current date and time.
    Syntax
    now()
    Examples
    now() == Feb 2, 1996
  • start
    Returns the start of a date range.
    Syntax
    start(date)
    Examples
    start(prop("Date")) == Feb 2, 1996
  • timestamp
    Returns an integer number from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
    Syntax
    timestamp(date)
    Examples
    timestamp(now()) == 1512593154718
  • year
    Returns a number corresponding to the year of the given date.
    Syntax
    year(date)
    Examples
    year(now()) == 1984
Math
  • abs
    Returns the absolute value of a number.
    Syntax
    abs(number)
    Examples
    abs(-3) == 3
  • cbrt
    Returns the cube root of a number.
    Syntax
    cbrt(number)
    Examples
    cbrt(8) == 2
  • ceil
    Returns the smallest integer greater than or equal to a number.
    Syntax
    ceil(number)
    Examples
    ceil(4.2) == 5
  • exp
    Returns E^x, where x is the argument, and E is Euler's constant (2.718…), the base of the natural logarithm.
    Syntax
    exp(number)
    Examples
    exp(1) == 2.718281828459045
  • floor
    Returns the largest integer less than or equal to a number.
    Syntax
    floor(number)
    Examples
    floor(2.8) == 2
  • ln
    Returns the natural logarithm of a number.
    Syntax
    ln(number)
    Examples
    ln(e) == 1
  • log2
    Returns the base 2 logarithm of a number.
    Syntax
    log2(number)
    Examples
    log2(64) == 6
  • log10
    Returns the base 10 logarithm of a number.
    Syntax
    log10(number)
    Examples
    log10(1000) == 3
  • max
    Returns the largest of zero or more numbers.
    Syntax
    max(number)
    Examples
    max(5, 2, 9, 3) == 9
  • min
    Returns the smallest of zero or more numbers.
    Syntax
    min(number)
    Examples
    min(4, 1, 5, 3) == 1
  • round
    Returns the value of a number rounded to the nearest integer.
    Syntax
    round(number)
    Examples
    round(4.4) == 4
    round(4.5) == 5
  • sign
    Returns the sign of the x, indicating whether x is positive, negative or zero.
    Syntax
    sign(number)
    Examples
    sign(4) == 1
    sign(-9) == -1
    sign(0) == 0
  • sqrt
    Returns the positive square root of a number.
    Syntax
    sqrt(number)
    Examples
    sqrt(144) == 12
  • toNumber
    Parses a number from text. Using toNumber on a date will convert it milliseconds in Unix Epoch time.
    Syntax
    toNumber(text)
    toNumber(number)
    toNumber(boolean)
    toNumber(date)
    Examples
    toNumber("42") == 42
    toNumber(false) == 0
Miscellaneous
  • empty
    Tests if a value is empty.
    Syntax
    empty(number)
    empty(text)
    empty(boolean)
    empty(date)
    Examples
    empty("") == true
Moment.JS Date Formats
The Date functions use Moment.JS datetime formatting. Below is the reference to the supported formats.
Formatting Tokens
  • Year, month, and day tokens

    Year, month, and day tokens

    Tokens are case-sensitive.
  • Week year, week, and weekday tokens

    Week year, week, and weekday tokens

    For these, the lowercase tokens use the locale aware week start days, and the uppercase tokens use the ISO week date start days.
    Tokens are case-sensitive.
  • Locale aware formats

    Locale aware formats

    Locale aware date and time formats are also available using LT LTS L LL LLL LLLL. They were added in version 2.2.1, except LTS which was added 2.8.4.
    Tokens are case-sensitive.
  • Hour, minute, second, millisecond, and offset tokens

    Hour, minute, second, millisecond, and offset tokens

    Tokens are case-sensitive.
String Formats
  • ISO8601
    An ISO 8601 string requires a date part.
    2013-02-08  # A calendar date part
    2013-W06-5  # A week date part
    2013-039    # An ordinal date part
    
    20130208    # Basic (short) full date
    2013W065    # Basic (short) week, weekday
    2013W06     # Basic (short) week only
    2013050     # Basic (short) ordinal date
    A time part can also be included, separated from the date part by a space or a uppercase T.
    2013-02-08T09            # An hour time part separated by a T
    2013-02-08 09            # An hour time part separated by a space
    2013-02-08 09:30         # An hour and minute time part
    2013-02-08 09:30:26      # An hour, minute, and second time part
    2013-02-08 09:30:26.123  # An hour, minute, second, and millisecond time part
    2013-02-08 24:00:00.000  # hour 24, minute, second, millisecond equal 0 means next day at midnight
    
    20130208T080910,123      # Short date and time up to ms, separated by comma
    20130208T080910.123      # Short date and time up to ms
    20130208T080910          # Short date and time up to seconds
    20130208T0809            # Short date and time up to minutes
    20130208T08              # Short date and time, hours only
    Any of the date parts can have a time part.
    2013-02-08 09  # A calendar date part and hour time part
    2013-W06-5 09  # A week date part and hour time part
    2013-039 09    # An ordinal date part and hour time part
    If a time part is included, an offset from UTC can also be included as +-HH:mm+-HHmm+-HH or Z.
    2013-02-08 09+07:00            # +-HH:mm
    2013-02-08 09-0100             # +-HHmm
    2013-02-08 09Z                 # Z
    2013-02-08 09:30:26.123+07:00  # +-HH:mm
    2013-02-08 09:30:26.123+07     # +-HH
  • RFC 2822

Examples

Toggle Checkbox Based on Different Property

Examples

NameText FieldValue or BlankDateIcon Check NegativeIcon Check Positive
Matched ValueImportant   
Blank Value     
Non-Matched ValueNot Important    
Formula
If Text Field is empty or Text Field is equal to Important then show a checked box, else show an unchecked one.
or(empty(prop("Text Field")), prop("Text Field") == "Important")
Formula
Thank you to David Thrale for this one!
if(dateBetween(prop("Target"), now(), "days") > 0, "✅", "❌")

Logic Examples

Examples

NameBasic IfMany Nested If
   
Basic If
if(true, "It's True", "It's False")
If Nesting
if(if(if(if(if(true, false, true), true, false), false, true), true, false), "It's True", "It's False")
If's will evaluate from inside out. For the above condition, it will go like so:
  1. FALSE: if(true, false, true)
  2. FALSE: if(if(true, false, true), true, false)
  3. TRUE: if(if(if(true, false, true), true, false), false, true)
  4. TRUE: if(if(if(if(true, false, true), true, false), false, true), true, false)
  5. "It's True": if(if(if(if(if(true, false, true), true, false), false, true), true, false), "It's True", "It's False")
Example If to Count Number of Multi-Select Values

Examples

NamePeoplePeople CountCostResult
 JohnSally 1000 
 John 750 
 BobSallyJohn 2000 
Formula
if(length(prop("People")) > 0, length(replaceAll(prop("People"), "[^,]", "")) + 1, 0)
You can also hide the People Count column and just use it as a behind the scenes calculation as well.
Assigning Point Values to Selectors

Point Values

NameMethodMethod-ValueDifficultyDifficulty-ValuePoint Value
Item 1Fix Easy  
Item 2Test Medium  
Item 3Create Hard  
Method-Value
if(test(prop("Method"), "Fix"), 1, if(test(prop("Method"), "Test"), 2, if(test(prop("Method"), "Create"), 3, 0)))
Difficulty-Value
if(test(prop("Difficulty"), "Easy"), 1, if(test(prop("Difficulty"), "Medium"), 2, if(test(prop("Difficulty"), "Hard"), 3, 0)))
Point Value
prop("Method-Value") + prop("Difficulty-Value")
💡
You can go ahead and hide the Method-Value and Difficulty-Value columns then so that it cleans up the display, you can see how to do that, as below under the table menu, ...

Date Examples

Examples

NameOrigin DateDateNowMonth DateYears DifferenceDays DifferenceOver 21 Days?# of WeekWeekdayMidnight of Current Day
Date Tests        
Return Number of Month
month(prop("Date")) + 1
The reason to add 1 is that this starts at 0 (January), this is then a more standard value.
Get Number of Years Between Dates
dateBetween(prop("Date"), prop("Origin Date"), "years")
Get Number of Days Between Dates
dateBetween(prop("Date"), prop("Origin Date"), "days")
Current Date & Time
now()
Is the Number of Days Between Two Dates over 21 Days
if(dateBetween(prop("Date"), prop("Now"), "days") > 21, "Yes", "No")
This is a more complex comparison that not only compares dates but also if it meets a certain criteria.
Get Number of Week
formatDate(now(), "gg")
Weekday
day(now())==0 ? "Sunday" : day(now())==1 ? "Monday" : day(now())==2 ? "Tuesday" : day(now())==3 ? "Wednesday" : day(now())==4 ? "Thursday" : day(now())==5 ? "Friday" : day(now())==6 ? "Saturday" : "Unknown"
Credit: Evgeny Petrovskiy & updates by Odysseas Lamtzidis
Midnight of Current Day
dateSubtract(dateSubtract(now(), hour(now()), "hours"), minute(now()), "minutes")
This can be useful if you need to compare dates prior to current day and additionally exclude today (now() will exclude just before current moment).
⚠️
Note on Time Value Precision Values such as Created Time, Last Modified Time and formatting dates as Unix Epoch times will only go to minute precision. Example: 1554728160000 this will not include second and fractional seconds.

Date Calculation Examples

BornDays (inc. End Date)MonthsYearsRemaining MonthsRemaining DaysFormatted TextName
       
The above example was requested when very specifically formatted text was needed from a date calculation.
Formulas
Note: I am adding the +1 to include the end date in the calculation.
Days (inc. End Date): dateBetween(now(), prop("Born"), "days") + 1
Months: dateBetween(now(), prop("Born"), "months")
Years: dateBetween(now(), prop("Born"), "years")
Remaining Months: prop("Months") - 12 * prop("Years")
Remaining Days: dateBetween(now(), dateAdd(dateAdd(prop("Born"), prop("Years"), "years"), prop("Remaining Months"), "months"), "days") + 1
Formatted Test: concat(format(prop("Years")), " years, ", format(prop("Remaining Months")), " months, ", format(prop("Remaining Days")), " days")

Math Examples

Examples

NameFirst NumberSecond Number1st # > 0 * 8 Else 02nd # > 0 * 8 Else 0Round Pi UpRound Pi DownRound Pi to 0 Dec. PlacesRound Pi to 2 Dec. PlacesRound Pi to 3 Dec. Places
Number Examples05      round(pi * 100) / 100
Multiply by 8 if not 0
if(prop("First Number") > 0, prop("First Number") * 8, 0)
This is just an example of a simple numerical condition
Round Pi to n Decimal Places
0 Decimals: round(pi * 1) / 1
2 Decimals: round(pi * 100) / 100
3 Decimals: round(pi * 1000) / 1000
Keep in mind that using Floor can get the same result as rounding to 0 Decimals.
Note: Default round is a single decimal place.
Round Pi Up
ceil(pi)
Note: To the nearest whole number.
Round Pi Down
floor(pi)
Note: To the nearest whole number.

String Manipulations

Examples

NameTextCount
   
   
   

Example

NameLower Case StringUpper Case StringMixed Case StringLower CaseUpper Case StringCapital Case
 i am lower caseI AM UPPER CASEI aM MixED cASe   
       
       
Transform Text to Lower Case
replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(prop("Mixed Case String"), "A", "a"), "B", "b"), "C", "c"), "D", "d"), "E", "e"), "F", "f"), "G", "g"), "H", "h"), "I", "i"), "J", "j"), "K", "k"), "L", "l"), "M", "m"), "N", "n"), "O", "o"), "P", "p"), "Q", "q"), "R", "r"), "S", "s"), "T", "t"), "U", "u"), "V", "v"), "W", "w"), "X", "x"), "Y", "y"), "Z", "z")
Transform Lower Case Text to Upper Case
replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(prop("Lower Case String"), "a", "A"), "b", "B"), "c", "C"), "d", "D"), "e", "E"), "f", "F"), "g", "G"), "h", "H"), "i", "I"), "j", "J"), "k", "K"), "l", "L"), "m", "M"), "n", "N"), "o", "O"), "p", "P"), "q", "Q"), "r", "R"), "s", "S"), "t", "T"), "u", "U"), "v", "V"), "w", "W"), "x", "X"), "y", "Y"), "z", "Z")
Transform Lower Case Text to Capital Case
replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(prop("Lower Case String"), "^a", "A"), "^b", "B"), "^c", "C"), "^d", "D"), "^e", "E"), "^f", "F"), "^g", "G"), "^h", "H"), "^i", "I"), "^j", "J"), "^k", "K"), "^l", "L"), "^m", "M"), "^n", "N"), "^o", "O"), "^p", "P"), "^q", "Q"), "^r", "R"), "^s", "S"), "^t", "T"), "^u", "U"), "^v", "V"), "^w", "W"), "^x", "X"), "^y", "Y"), "^z", "Z"), " a", " A"), " b", " B"), " c", " C"), " d", " D"), " e", " E"), " f", " F"), " g", " G"), " h", " H"), " i", " I"), " j", " J"), " k", " K"), " l", " L"), " m", " M"), " n", " N"), " o", " O"), " p", " P"), " q", " Q"), " r", " R"), " s", " S"), " t", " T"), " u", " U"), " v", " V"), " w", " W"), " x", " X"), " y", " Y"), " z", " Z")

Count & Contains Examples

Example

NamePeopleNumber of PeopleCheck 1Check 2Check 3Number CheckedTagsTag Has "MyTag" or "AnotherTag"
Example One@Adam Listek Yes No MyTagAnotherTagYetAnother 
Example Two  YesYesYes YetAnother 
Count Number of People in Column
if(length(prop("People")) > 0, length(replaceAll(prop("People"), "[^,]", "")) + 1, 0)
Note: Count number of comma's in the People column.
Count Number of Checkboxes Checked
toNumber(prop("Check 1")) + toNumber(prop("Check 2")) + toNumber(prop("Check 3"))
Note: Downside is you have to manually specify each Column.
Test if Tags Field Contains Values
if(or(contains(prop("Tags"), "MyTag"), contains(prop("Tags"), "AnotherTag")), "Contains Tags", "Doesn't Contain Tags")

Grade Example

Courses

NameGradeWeightingWeighted GradesMissing
Assignment 1850.2  
Assignment 2850.4  
Assignment 3 0.1  
Assignment 4 0.1  
Assignment 5800.2  
Weighted Grades
prop("Grade") * prop("Weighting")
Traditionally weighted grades are a percentage of the total which you then add up. In this case I used the Sum total at the end.
Missing Grades
(prop("Grade") > 0) ? false : true
Another idea for this is to have a related table that does the average, sum's and number of missing assignments as the total's are not usable via a formula in another page.
Source: Silvan
Updating...

Share on