Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

0vote

Limit number of decimals in Notion formula

I have a simple formula an I want to show only 2 decimals in the result.

Income: $1,502.72
Expense: -$71.00

format(abs(prop("Income") + prop("Expense")))

Result: $1431.720000000001

Changing it to ceil, round or floor removes all decimals and I am trying to show only 2 decimals like this:

$1431.72

How can I do that?

2 Answers

0vote

Saritanotion Points1020

When a Formula property returns a number, it can contain numerous decimals. Here’s an easy way to specify the number of decimals.

Start with a database containing a Formula property with too many decimals.
Determine your modifying number. For your final output to contain one decimal, use 10; for two decimals, use 100. (Add a zero for each decimal place.)
Multiply the full formula by your modifying number. (You may need to wrap the existing formula in parenthesis. PEMDAS)
Surround the new formula with the round function.
Divide that new formula by your modifying number.

0vote

nosy commented

Can you please share an example using the information from the question?

Thanks.

0vote

polle Points90570

Not sure if you are still facing this Notion problem with decimals, but try the following formula using yours as an example.

format(round(abs(prop("Income") + prop("Expense")) * 100) / 100)

Hope that helps.

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect