Derived Relations ( Formulas )

it can be used extensively, sum or average of column values and all is just so important, like for gym logs and stuffs, i also it for calculating the amount of hours allocated to each subject in my work, which i have on notion as anytype doesnt support doing math. Database feature is like soo important. I will usrely share some usecases on the forum!

2 Likes

:smile:
I recently spoke with the Notion team about the same topic!
Have a block displaying an element of a base or a calculation based on a base, configurable via a formula, to be able to create dashboards!

Here are some use cases to support the suggestion…

Let’s take a database of support tickets ;-).
On the dashboard, it would be useful to display for example, from this value of the calculation line :

  • the number of open tickets not assigned (thus number of lines following these filters)
  • the average time of resolution (assuming a number field containing the duration of resolution, it would be the average of these fields)
  • and (probably with several blocks necessary) it will be possible to have the number of tickets for each category (Bug, Evolution, etc)

And…

  • Display the title/link of the priority ticket (filter by criticality, open and unassigned status and then display the title only)
  • Display the status of an important ticket in process (filter to have only this ticket then display the status)

A dashboard based on a “wine cellar” database :slight_smile:

  • total number of bottle
  • number of bottle by color
  • list of bottle ready to drink this year (ok, a filtered set is enough for that but I would just like the list without all the other display elements of a set around)

A citation base?
→ quote of the day

And with the widgets sidebar coming in Anytype, there will be many other uses!

2 Likes

To add some more use cases:

Formulas/queries could be used to replace/restructure/upgrade sets and inline sets.

Using a formula/query to generate a list of objects that have the current object as a relation. This can be used as a rollup type feature as another relation, but also it could be used inline to replace/provide an alternative to inline sets.
E.g., in a human object, generating a list of book objects where the author relation is that human object.
The formula for this could look something like: =query(object.book).filter(relation.author(object.current))

Using a formula to count the number of objects generated in a query.
E.g., in a human object, counting the number of book objects where the author relation is that human object.
The formula for this could look something like: =query(object.book).filter(relation.author(object.current)).count()

Using a formula/query to generate a list of uncompleted tasks that are assigned to me that are due this week
The formula for this could like something like: =query(object.task).filter(relation.due_date(>2023-05-14,<2023-05-20),relation.asignee(object.human(‘Bob’)),relation.task_status(FALSE)).sort(relation.due_date, asc)

Forgive my poor coding lol, but hopefully you get the general idea.

3 Likes

In my mind, Anytype would leapfrog all other platforms mentioned in this thread if they could implement this functionality. It’s amazingly powerful. It puts Coda in a league of it’s own and the absence of it is the only limitation of Anytype that prevents me from making the switch currently.

4 Likes

I agree that this is really needed.
And I insist on the REALLY !

But, in my case, I never liked the way Notion did it. I found it very cumbersome to use and not very practical. I found the Coda way more… intuitive. But I will let the developer choose a way that can work for most of us :slight_smile:

6 Likes

I can’t wait for the Anytype team to implement this powerful functionality. The formulas are what I miss most in Anytype. I don’t care if it’s finally done the Notion way or the Coda way, but it’s important to have it somehow.

3 Likes

lack of formula functionality, mainly within databases (aka collections) is the main thing holding me back from fully investing into AnyType. It is objectively better in every other way, but the lack of robust formula system is stopping me.

3 Likes

I absolutely need this to implement a “Completed At” timestamp. This would allow me to filter out tasks that were completed a long time ago

3 Likes

I love this. I hope, it will be implemented soon!

1 Like

I want this really bad. I use the formula field a crap-ton in Notion for some really awesome dynamic views. I would kill to have this here.

2 Likes

:wave:t3: Hi Everyone

:exclamation: Please be aware

Many comments express the desire to implement this feature soon, where I share the same opinion as you and wish it. But I would like to remind you to also describe your use cases as @ignatovv & @Dragos says:

So @lolfert , @Yann , @luiso , @otibmit, @mavka and @lousytrybrian please name your specific use cases for this feature. So that the developers can see the importance of this feature for the community.

:hammer_and_wrench: My Use cases:

As @arminta7 said:

  • Tracking the various measurable things to see its development/trend.
    Health: tracking habits, body weight, training, diary, etc.
    Wealth: finances, trading, budgets & taxes etc.

  • In a further step: To visualize my progress of my goals and projects etc. in form of progress bars or different kind of charts.

:pray:t3: Hope:

I hope that with my post this feature gets more attention and can possibly be tackled a little earlier.

9 Likes

Why don’t I see this on the roadmap?

This is by far the most requested feature.

2 Likes

For my use case I like to track daily stats. In Notion a day view will look like this:

These are all formulas that pull from the other properties and makes this really cool view (this is Board view) that is dynamic based on the information I enter in to the properties. The movies/tv shows, books, and locations are relations pulling from another database.

One of these fields would look like this in a formula property:

if(prop(“Watched”) == “”, “:tv: I didn’t watch anything today.”, “:tv: I watched " + prop(“Watched”) + " today.”)

I also like to use the formatDate formula to extract the time from the Date&Time, but Anytype doesn’t support time with the date (which stinks…).

And then I used to use a formula I got from Red Gregory that was a progress bar (before Notion officially supported progress bars, which Anytype should steal) for showing book progress.

That’s a few use cases for me.

2 Likes

Not on my screen. :wink:
Calendar is still the most voted one, and formulas might even fall to third place soon.

Iirc, the Anyteam should be soon deciding on what they want to prioritize in the last 2 quarters, so if they decide to work on it, it’ll appear on the roadmap soon.
But if I also remember correctly, there were some technical and architectural issues that need to first be resolved before they can even start working on formulas. This was mentioned long ago, so maybe this isn’t an issue anymore.

@lousytrybrian

Very cool and practical summary of your day :sunglasses:.
And the fact that it’s dynamic is well thought out. :+1:t3:

1 Like

Hi, I’m two days into Anytype, first post.

I’ve been using Coda for a while, mainly as a repository for reference data that I need to build for another system (its ability to build tables in a document and then be able to cut and paste is great) Anytype fulfils my desire not to be dependent on hosted services.

In my playing around I used the document safe box example from YouTube and tried building an object for drivers licences, so that’s my simplistic use case.

I have three drivers licences and my partner has two. So my object looks like
Licence.Human, Licence.Issuer, Licence.ExpiryDate, Licence.Name

To show these in a set I am compelled to use the Licence.Name field.

Licence.Name should be computed from Licence.Human.Name + Licence.Issuer.Name otherwise I have to type the Licence.Name field and make it something meaningful.

This is just my simple example, but pretty much any object that is a compound of other objects of different ownership and different issuer are probably going to be the same. I suppose I could use the licence number as the name, but then I’ve got a label title that doesn’t equate to what the contents are and also it won’t be very descriptive if I use that somewhere else.

So the ability to make relations computed based on the contents of other relations,

3 Likes

Would be very helpful if the databases has a formula column to allow simple math operations or text generation with concatenated content.

USE CASES

A formula column that takes an anual cost value (a number from another column) and divide it to have the monthly cost from something.

A formula column that takes the start date from column A and the end date from column B to indicate a duration, for example, from a project.

A formula column with an “IF” statement where you could return a message. “IF” column A contains “DONE”, than write “The project is concluded.”

SIMPLER APPROACH

A formula column with simple math operations that manipulate values from number columns would be already helpful.

REFERENCES

Notion and Coda.io both have formula columns, but if you need to take good inspiration, take a look at what Coda.io did. They design a whole system around formula columns and brought it even to the canvas, where you can create formulas in the middle of texts and you can create really complex systems from it.

7 Likes

+1!

I’ve many Notion db with formula, it would be very useful (and indispensable for others around me :wink:)

USE CASES

  • Concatenate field
    A database of software (or photos or anything else), you want a gallery with the sofware name and and the type in brackets. Or book title and author. Or…
    A concatenation formula is the trick that makes this possible on Notion. And as Anytype galleries have the same limitation (no formatting option for displayed relations), this will also be useful.
    Here “Use : Wiki, …” is a formula with concatenation (sorry, haven’t add Anytype yet :grin:)

  • Date calculation: I have a travel diary with dates that can vary… typically the timetable for the plane! If this schedule changes, the whole schedule updates itself as the following dates (arrival time, car pick-up, accommodation arrival, etc.) are calculated

  • Quantity calculation
    I have recipes (meals but also products such as soaps, etc.) with quantities to respect. All I have to do is change the “total quantity” value so that the calculated columns for the quantities of each item are updated. Quick and efficient!

1 Like

I dont get why so few people upvote this and I dont get why this isnt a priority since the beginning. What do u want to do with a database full of numbers? Just look at them and sort it? :slight_smile:
Simple math first, complicated formulas later - coda solved it better than notion.

2 Likes

I just found out about Anytype and love the mission and vibe!

Related solution request
I am a professional video editor and want to keep track of the business I do.

Each project I work on would be an object with related budgets, number of days worked, hard costs I have to pass on, a commission percentage, etc. (Projects would also have many Humans and resulting pieces of created related as objects which I think Anytype would be great at doing).

Solution I’d like
I’d like formulas to be able to calculate my profitability on each job, average per day worked, etc. As well as perform calculations across multiple job-objects to judge performance over time. I’d like to view these calculations in a table format in individual cells, in footer rows of columns as was well as have each formula result able to be added to a dashboard.

Alternatives Considered
I believe Notion can perform all of the tasks I’ve described here.