i have a block template to calculate tea expense.
-[[tea and snacks expense]]
amount::
expense-category::
I normally create blocks with this template in the journals page daily.
when I query with
{{query(and [[tea and snacks expense]] (between [[Mar 26th, 2023]] [[Apr 25th, 2023]] ))}}
it returns query table
and I use a query table function below it as a child block to the above query
{{function (sum :amount)}}
logseq does not return the total amount. what could be the reason?
This issue #9563 has not been fixed completely. I have been waiting patiently for the bug fix; but when I saw it was marked complete; I wondered whether it was intentional to partly fix it or was missed. I’m using the latest version and still facing the issue.
Although individual sum, average functions are working; this is not working:
{{ function (+(sum :x) (sum :y))}}
It works for me. If at least one of the values of the properties is a string itself instead of a number, it ends up like you said. Have you tried your query in a small dataset (preferably in a new graph), where you can quickly check each value?
Thanks @mentaloid for the clarification. My functions used to work earlier and stopped since 0.9.1 or so. I updated the empty fields to 0 and they gave a good result. Probably related to db structure changes.
Thanks again!!