How can the numbers in the yaml field be automatically summed and updated automatically? #564
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
If you're willing to use a bit of DataviewJS: `$= dv.span(dv.pages().amount.reduce((p, c) => p + c))` |
Beta Was this translation helpful? Give feedback.
-
I have the same situation; trying to sum a number however i get a TypeError when using this code: $= dv.span(dv.pages().OtTime.reduce((p, c) => p + c)) This is the errormsg: My attribute/yml-key is called OtTime. I have no .js exp but have tried to find solutions online without success. What could i be doing wrong? |
Beta Was this translation helpful? Give feedback.
If you're willing to use a bit of DataviewJS:
`$= dv.span(dv.pages().amount.reduce((p, c) => p + c))`