Setting up code in the Dataview plugin in Obsidian to calculate the sum of data within a specified time interval

Setting up code in the Dataview plugin in Obsidian to calculate the sum of data within a specified time interval

Hello! I have a question about using the Dataview plugin in Obsidian. I need to set up the code to calculate the sum of data within a specific time interval, for example, between August 11, 2023, and October 11, 2023. How can this be achieved?

Here is the main code where changes or additions are needed:

TABLE WITHOUT ID  
    sum(number(rows.budget_g)) + " t" AS "Summa"
FROM #sss1  
GROUP BY true

And where/how is your date stored? A property? Modification time? And in which form are your dates?

1 Like

The right answer is this:

TABLE WITHOUT ID  
    sum(number(rows.budget_g)) + " $" AS "Summa job $"
FROM #sss1
WHERE file.day >= date(2023-01-01)
  AND file.day < date(2024-01-01)
GROUP BY true

code works.