Is your feature request related to a problem? Please describe.
It is not possible to perform column aggregations such as sum, count, average in the grid view
Describe the solution you’d like
The grid view looks like a traditional table / database from notion. However, it does not provide an option to perform aggregation of values in a column such as sum, count, average. Having such options should aid in using the sets for inventory management, finance management etc, which generally perform all sorts of aggregation of data
Describe alternatives you’ve considered
One could create a new object of the same type in the set and add the aggregations manually. But it is not feasible and the aggregation needs to be updated for each new object added to the set
Additional context
Notion displays an overlay after the last row of a table to perform aggregation of columns:
Hi! I agree with @lynxlove
I am freelance and work on several projects and it would be great to be able to enter my hours in anytype, since I use anytype for the to-dos and write down ideas on the projects. This would represent a fantastic implementation for me.
Same for me: I list my bills into a “Payments” set. I have Grid views for “To be paid”, “Late”, “Paid” and it would be useful to have sums at the bottom of the Grid view.
I would kill to have this feature. I like to add some stats to my daily notes and would love to be able to see a sum or average of them here. I would love to fully be able to switch over from Notion. This is a big one.
I am aware of the fact that adding the databases feature would honestly take a lot of time, but to compensate on that as of now simple math calculations in sets like giving a total of #number type of relation or average of the numbers would give me as well a lot of people good productivity boost as of now!
I never expected AnyType to be lacking basic mathematical functions until I started transferring my finance database from Notion to here and I would also really love to have the possibility of math functions integrated in the tables.
What’s even more surprising is that we can’t even see the total number of objects in a set view (which I guess is the COUNT function). I need to be able to see how many objects are in a given column in a kanban board, how is this not a feature already?
I wanted to really get started with anytype and move my data there, but discovered today that it lacks basic database / table / set features like this. And I didn’t even find a reference to features like this in the public roadmap. I am really hoping this topic gets picked up
Thinking about this made me imagine more advanced stuff, for example a block (inline) where users can input a query and which then aggregates data (from objects of the same or different types) and does some calculations. Simple examples would be: “get all ingredients from all objects of type recipe in the specified collection and compile a list of all ingredients (no dublicates) listed in these objects” → shopping list.
Or “get all objects of type transactions with a date this month, sum up the values and subtract from income” → money left over to save or spend this month.
For the lack of a better name: “SQL blocks”.
This probably deserves its own thread ^^
Display the number of elements of a set or collection. This count should take filters into account.
HOW COULD IT BE DONE
Display the number of elements of a given set/collection somewhere in the title bar.
REAL WORLD USE CASES
This is very helpful to get an overview over the data. It can also be used to quickly answer questions like: “How many books with a certain tag have I read?”, “How many open to-do’s do I still have?” or many similar questions.
RECOMMENDED ALTERNATIVES
You could just manually count the elements, but that is needlessly tedious and nearly impossible for very large sets/collections.
The number of elements could also be an automatically generated relation. This would be somewhat hard to see and wouldn’t work well with different views/filters for sets.
+1 for Column aggregation functions, like Sum… For example, if I we want to use Anytype for project management / freelance work tool and create a Work-Diary, every freelancer needs to track/count hours. So one element in Diary entry is a Time/number of hours spent on a project and at the end of a month you want to calcuate the summary of time entries for a given project… If Anytype does not have this function, than unfortunately one has to work with/in two systems, or stay with the „old“ system. Me personally – I use Infinity (startinfinity.com) and I was blown away by Anytype, yet I found out I can not use it because it is missing this basic function. So maybe someday… other than that it looks as very, very nice, user friendly and complex tool