Help between Notion users

It's free & easy

Vote and select answers

Receive points, vote and give the solution

1vote

You are X ahead/behind formula help

Hello! I'm currently in the process of moving all of my book tracking away from Goodreads and into Notion. I have pretty much 98% of it done apart from one of my favourite things about Goodreads; the challenge tracker.

I'm looking for a formula that will tell me how many books behind/ahead or if I'm right on track with my goal for the year based on the current date and my books read so far.

Here's the properties I currently have:

And here's the formula for the Reading Progress (just if this helps at all):

``if(prop("Total Read") == 0, "You’ve not started this challenge yet.", if(prop("Total Read") < prop("Reading Goal"), "You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!", "You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Congratulations!"))``

If I'm being completely honest I don't really know what I'm doing with formulas, I'm just typing and hoping for the best, but I can't seem to figure this out.

1vote

Hi nicdall - here you go! You can see this working, along with the same formula notes, in the below Notion page which you can duplicate if you want. I broke the formula down so you can see how I thought about it.

``````//final formula

if(prop("Total Read") == 0, "You've not started this challenge yet.", if(floor(subtract(prop("Total Read"), prop("Current Target"))) < 0,concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!"), concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")))

//breaking down the formula into components while writting it components

//books per day
prop("Reading Goal") / 365

//calculate books should have read by now
floor(toNumber(format(dateBetween(end(now()), start(prop("Start Date")), "days") + 1)) * prop("Books Per Day"))

//calculate books ahead or behind
floor(subtract(prop("Total Read"), prop("Current Target")))

//display books behind
concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!")

concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")

//level 1 of final formula - no books read
if(prop("Total Read") == 0, 1, 0)

//final level of formula - behind/ahead schedule
if(prop("Total Read") == 0, "You've not started this challenge yet.", if(floor(subtract(prop("Total Read"), prop("Current Target"))) < 0,concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books so far! Keep going!"), concat("You've read " + format(prop("Total Read")) + "/" + format(prop("Reading Goal")) + " books! Keep going!")))``````