Red Gregory

View Original

Notion Formula: Difference Between Two Values In The Same Column

What I want to find: Is the current payment higher or lower than the previous?

The Properties

Each payment (entry) includes an input property. The next two properties are a child relation to grab the previous payment entry, and a rollup property to return the input of the previous entry.

The Formulas

Find discrepancy between current input and last input:

prop("Input") - prop("Last Input")

Return emojis and text alongside formula above:

(prop("Input") - prop("Last Input") > 0) ? ("📈UP: " + "$" + format(prop("Input") - prop("Last Input"))) : ("📉DOWN: " + "$" + format(abs(prop("Input") - prop("Last Input"))))

View Example In Notion