obsidian-db-folder
obsidian-db-folder copied to clipboard
[FR]: Footer Number Functions for Formulas and Rollups
Contact Details
Present your request
Right now footer formula features like sum, min, max are only available to number type columns. The problem is Formulas and Rollups are often used to create number type columns. Ideally, these number functions would be available for Formulas and Rollups so we could sum a formula column.
Additionally, please add an average function.
For which platform do you request this request??
Desktop
hello @liznelson , currently formulas returns always a string value due the component rendering structure.
On the other hand, in the formulas you have available the methods that the footer uses for the numbers
for example:
db.numbers.sum(<array of values>)
Checkout interfaces https://github.com/RafaelGB/obsidian-db-folder/blob/master/src/cdm/ModulesFnModel.ts
Hope it helps
Hi @RafaelGB,
Sorry if this is a dumb question. How do you return all the values of a column as an array? My goal is to use that in the sum function inside a footer formula?
I just can't figure it out. I tried the following (along w/ a few other silly attempts):
db.numbers.sum(values["<name of column>"])
db.numbers.sum(values.<name of column>)
db.numbers.sum(${values["<name of column>"]})
db.numbers.sum(${values.<name of column>})