Help between Notion users

It's free & easy

Receive points, vote and give the solution

1vote

# Number with Commas Not Working

I'm a newbie and can't figure out how to get a comma added to this formula: ": " + format(prop("Views"))

Views is a number being pulled from YouTube API. When it comes into notion I have it set to display as number with commas. It looks like this: 1,000 But since it doesn't include a label of what the number is, I created another formula property "View Label" which you see above. But it doesn't bring the comma over. It looks like this: : 1000 Someone suggested I use replaceALL but no idea how to add it to the formula I've got.

1vote

chickspirit Points220

Actually it is possible the tutorial I followed had them in there.
But thank you for posting because that made me go back and revisit the steps. Turns out the formula to get the comma is at the very bottom of the tutorial.

Here it is in case anyone else ever needs it...

``": " + replace(replace(format(prop("Views")), "(\\d{1})(\\d{3})\$", "\$1,\$2"), "(\\d{1})(\\d{3},\\d{3})", "\$1,\$2")``

0vote

### polle commented Feb 18

Thank you for sharing!

You are replacing there and if your numbers are not more than 9 digits that will work fine, but for natural results converting to text (without replacing), commas are not supported in the formula result.

1vote

### chickspirit commented Feb 18

@polle Thank you for the clarification.
What happens if it's more than 9 digits?

1vote

### polle commented Feb 18

It will stop working and you will have to create a new formula to keep replacing, that is why it is important to know it is not a natural from number to text formula.

0vote

polle Points46140

You are doing it correctly.

Commas in Notion formulas when you convert numbers to text are not supported at the moment. Hopefully Notion implements this in the future.

...