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

1vote

Sum formula for all items from the Relations property

I have a Relations property with multiple items (and some of them can repeat). I need a formula to count the total amount of numbers assigned to each of the items via the same formula. I only got as far as using

replaceAll(prop("Tag"), "Item 1", "1410") + replaceAll(prop("Tag"), "Item 2", "980")

but it gives me bonkers results: "Item 1, 1410, 1410980, Item 1, Item 1". How do I replace all of the same items and at the same time add all of this to get a sum?

0vote

andreymagnus commented

Oh I found how to get the numbers. Still can't get the sum though

replaceAll(replaceAll(prop("Tag"), "Item 1", "1410"), "Item 2", "980")

The result of the formula is "1410, 980, 1410" - just as I wanted. But I'm not sure how to count a sum within this formula as toNumber formula leaves me with just one entry (1410)

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