Adding rounded percentages, but total doesn't equal 100%
Multiply by a percentage then roundup to nearest whole number in one formula
Complex Formula rounding to nearest whole number %
(I need to change the formula later to fix something.)
You can try this formula, which should round the percentage to the nearest whole number:
ifs(
prop("Formula")>1,
"■■■■■■■■■■" + " │100%",
prop("Formula")<0,
"□□□□□□□□□□" + " │0%",
substring("■■■■■■■■■■", 0, 10 * prop("Formula"))
+
substring("□□□□□□□□□□", 10 * prop("Formula"))
+ " │"
+ let(
number,
100 * prop("Formula"),
if(
number-floor(number)>=0.5,
ceil(number),
floor(number)))
+ "%")You also have this formula, but it looks more like a typical progress bar, so it might not be the kind of style you want:
lets(
formula2,
if(prop("Formula")>1, 1, prop("Formula")),
formula3,
100 * prop("Formula"),
ifs(
and(prop("Formula")>=0.995, prop("Formula")<1),
" ".repeat(9).split("").map(current.style("blue", "blue_background", "c", "u")).join(" ")+ " " + " ".style("grey_background", "c") + " │100%",
prop("Formula")<0,
" ".repeat(10).split("").map(current.style("grey_background", "c")).join(" ")+" │0%",
[" ".repeat(floor(10*formula2)).split("").map(current.style("blue", "blue_background", "c", "u")).join(" "),
" ".repeat(10-floor(10*formula2)).split("").map(current.style("grey_background", "c")).join(" ")].filter(!empty(current)).join(" ")
+ " │"
+ if(
formula3-floor(formula3)>=0.5,
ceil(formula3),
floor(formula3))
+ "%"))This is how the second one looks like:
You can find more progress bar designs here:
https://www.redgregory.com/notion/2021/6/4/17-progress-bar-designs-in-notion
Oh yeah, and you also have Notion's progress bar if you want to use that.
More on reddit.comNeed to round up to whole numbers at .6, and round down at .5
Videos
I have a massive array of data which lists amounts per month by account. I need to show a percent per month per account, but each month needs to add up to 100%. Month across the top in the pivot, account by column.
When rounding off the components per month to 3 digits, the total then doesnt always add up to 100%. Is there a way to plug like + or - 0.001 to the highest number to make it add up?
Thanks
EDIT - Added further info from responses.
Using those pivot reported % as a rate for other data. If it's not rounded off then those rates wont fully clear since the system it's being imported into only allows 3 decimals
Its not just about the display, but components adding up. What's being done is taking prior data, converting that to a % per month, then back to dollar amounts for the budget clearing which needs to also go to 0 but that latter amount isn't in excel to allow rounding functions.
Prior person who did this had to manually plug 0.001s dozens of times across hundreds of accounts to make it work but I don't want to do that
Hi guys, I've got this fancy formula result that I copied from one of the creators long ago and it's yielding me % with lots of decimal places. Can someone please advise on how i can modify the existing formula to round it to nearest whole percentage? Thanks!
((if(Formula < 0.1, "■□□□□□□□□□", substring("■■■■■■■■■■", 0, 10 * Formula) + substring("□□□□□□□□□□", 10 * Formula)) + " ") + format(100 * Formula)) + "%"
(I need to change the formula later to fix something.)
You can try this formula, which should round the percentage to the nearest whole number:
ifs(
prop("Formula")>1,
"■■■■■■■■■■" + " │100%",
prop("Formula")<0,
"□□□□□□□□□□" + " │0%",
substring("■■■■■■■■■■", 0, 10 * prop("Formula"))
+
substring("□□□□□□□□□□", 10 * prop("Formula"))
+ " │"
+ let(
number,
100 * prop("Formula"),
if(
number-floor(number)>=0.5,
ceil(number),
floor(number)))
+ "%")
You also have this formula, but it looks more like a typical progress bar, so it might not be the kind of style you want:
lets(
formula2,
if(prop("Formula")>1, 1, prop("Formula")),
formula3,
100 * prop("Formula"),
ifs(
and(prop("Formula")>=0.995, prop("Formula")<1),
" ".repeat(9).split("").map(current.style("blue", "blue_background", "c", "u")).join(" ")+ " " + " ".style("grey_background", "c") + " │100%",
prop("Formula")<0,
" ".repeat(10).split("").map(current.style("grey_background", "c")).join(" ")+" │0%",
[" ".repeat(floor(10*formula2)).split("").map(current.style("blue", "blue_background", "c", "u")).join(" "),
" ".repeat(10-floor(10*formula2)).split("").map(current.style("grey_background", "c")).join(" ")].filter(!empty(current)).join(" ")
+ " │"
+ if(
formula3-floor(formula3)>=0.5,
ceil(formula3),
floor(formula3))
+ "%"))
This is how the second one looks like:
You can find more progress bar designs here:
https://www.redgregory.com/notion/2021/6/4/17-progress-bar-designs-in-notion
Oh yeah, and you also have Notion's progress bar if you want to use that.
round((your formula) * 100)/100 + "%"