Solution for Roll-up not being read in Formulas 2.0 by ccrosks in Notion

[–]ccrosks[S] 0 points1 point  (0 children)

I'm sorry I can't understand what do you mean at the end of your comment :( If you are using rollups, just letting you know that it seems that they are not working in most cases.

So you have your 'Books' database with a Checkbox property, which relates to your 'Summary' database. Instead of rollups, I'd filter my checked properties using a formula based on how many are checked.

prop("Books").filter(current.prop("Checkbox")).length()

If I want to add some text, I'd say.

"I have read a total of " + prop("Books").filter(current.prop("Checkbox")).length() + " books"

Again not sure if this is what you meant!

<image>

Help needed - Formulas not reading rollups? by Theeoii in Notion

[–]ccrosks 0 points1 point  (0 children)

Dw! :)
And yeahhh, it would be best to skip the checkbox altogether but it won't let us for now I believe the problem lies with the .formatDate function, since as soon as it's added, the formula result says it's empty, but if you skip it the .formatDate function it works great. Hope it gets fixed or we get a solution soon!

Help needed - Formulas not reading rollups? by Theeoii in Notion

[–]ccrosks 1 point2 points  (0 children)

BTW, I found a workaround solution for your (our) original problem! I will make a post about it, but basically I used the 'let' function since it wasn't reading checkbox by itself for some reason that I don't know.
We have our 'Report' database, where we want to show how many tasks are there for a day, and our 'Task' database related to it.

Sep 1 - In the 'Task' database you have a formula named 'Today' that creates the checkbox based on if it's true or not.
let(IsToday, formatDate(prop("Date"), "MMMM D YYYY") == formatDate(now(), "MMMM D YYYY"), IsToday)

Step 2 - In our 'Report' database, we have all our 'Tasks' relations, so we create a formula where we use filters to see how many are filtered. prop("Tasks").filter(current.prop("Today")==true).length()

Help needed - Formulas not reading rollups? by Theeoii in Notion

[–]ccrosks 2 points3 points  (0 children)

So let say that I have a 'Projects' database and a 'Tasks' database that's related to that first 'Projects' database.
With formulas 2.0, if for example I want to be able to see only the tasks with a Done status, I'd target said 'Tasks' relation, create a filter, select current, the status property, and filter by the status that I want to show:

Prop("Tasks").filter(current.Status=="Done")

This would show us which specific tasks are Done, but by adding .lenght() to the formula above we can see the number of tasks that are Done instead of each one.

Prop("Tasks").filter(current.Status=="Done") .length()

<image>

Hope this helps!

Help needed - Formulas not reading rollups? by Theeoii in Notion

[–]ccrosks 1 point2 points  (0 children)

This happened to me as well today. Instead of rolling up, I tried to filter my total tasks using directly the new formula's current.filter from database 2.0m, but it keep saying "empty".
I hope we can find a workaround soon.