I’m writing a Notion formula to show my goal progress with stars, and my formula is like this:
slice("⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐", 0, round(prop("percentage") / 10))
There should be 2/5/6 stars for each line, but why doe it not work properly?
Help between Notion users
It's free & easy
Answers, votes & comments
Receive points, vote and give the solution
I’m writing a Notion formula to show my goal progress with stars, and my formula is like this:
slice("⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐", 0, round(prop("percentage") / 10))
There should be 2/5/6 stars for each line, but why doe it not work properly?
As @polle mentioned a lot of emojis don't register as one character so the slice
function doesn't play very nice. Unfortunately some emojis register as even more than two characters, so you might have to do something like the following for other emojis.
replaceAll(slice("xxxxxxxxxx", 0, round(prop("percentage") / 10)), "x", "⭐️")