Closed Jack-Chronicle closed 3 months ago
There is currently no way to do this, though I certainly understand the use case and have had the same issue.
Let me think of a reasonable syntax for such a thing.
I think Calca’s syntax is a reasonable approach to this problem:
It works quite well for some uses.
On the other hand, there are times when I really just want a quick running tally and would prefer to do away with assigning variables altogether and have some kind of Soulver mode where you add basic arithmetic and values and treat any text as a comment, then return the total at the end of the statement. Maybe a sum
code block.
I think a way to incorporate this into the plug-in could be using indent levels?
The first level would be the sum total of those indented below it, similar to how the Sigma plug-in works
I've been playing with Numbr quite a bit and I really like it's syntax, definitely more so than Calca's:
# List of items
Item one: 256
Item two: -512
Item three: 1024
List Variable = sum
Basically, sum
just grabs everything above it up to the most recent heading.
Unfortunately, I'm getting constant data loss with Numbr so I'm still back to searching for something dependable I can run on iOS until Numerals adds support for summing.
Hello and thanks for making this excellent plugin :-)
I've been using Numi for quite a bit, and before that Soulver. I really love the fact that I can have everything inside Obsidian, but I'm also missing the "sum" function of Numi (and the similar functionality of Soulver) very much.
I'm often calculating yearly expenses month-by-month, so I have to define 12 variables, and then for the sum I have to actually write down the 12 variables again… which isn't optimal :-)
I've found a rather straight-forward way to implement this. And have the initial implementation done.
The syntax I am leaning towards is @sum
or @total
(its case-insensitive so capitalize however you like).
I would have liked to use sum
or total
to be similar to other apps, but someone may already have notes with total = blah + blah
and I don't want to cause confusion there. There are other places I am using @
as a Numerals-specific directive, so I'm going to stick with that to force the user to be specific when doing a sum/total.
Thoughts on this syntax from folks?
Looks fantastic to me!
That looks great!
This is now live in Numerals 1.4 (Beta)
Would really appreciate beta testing and feedback prior to me pushing this out as a full release! Please see the instructions on the README for how to use BRAT to beta test!
Looks like it's working, cheers! 🙏
Closing with public release of Numerals 1.5
Started using this recently, but noticed if you have a group of variables you have to name them each to sum them together, and aren't able to just request whatever heading they're under to sum them or sum from Variable A to Variable X and everything between them
I may be missing something that allows you to do this, but if not it would be great to add it