Things I have tried
I’ve been messing around with the sum() function but everytime I try, I break the table I’ve created.
What I’m trying to do
I am attempted to track my spending in a rapid log format in my daily notes. In other words, I’m hoping to just type something along the lines of “Spending:: Starbucks - 10” into my daily notes rapid log, and then use Dataview to compile that information later.
So, for example, a given day’s rapid log may look like this:
- 9:00am
- Spending:: Bought tights, a card for Anna, and gift bags at Duane Reade - 23.48
- 10:15am
- Spending:: Corner store - 2.50
- Breakfast:: Coffee and a croissant
- 10:30am-12pm:
- Church
- PG/Chancel choir sang
- Spending:: Offering - 30.00
- 12:00-1am
- Helped Gelilah with her tech stuff.
- 1am-3pm
- Spending:: Dinner at The Row with Anna - 54.75
- Lunch:: Shrimp and Grits
- 3:45-4:30pm
- Watered Shannon’s plants.
- Spending:: Starbucks Coffee Reload - 10.00
- 5:15pm
- Starbucks Coffee Reload - 10.00
- Spending:: Moving Boxes - 117.00
- 8pm
- Dinner:: Leftover Bua Thai Phuket noodles.
- 9:00pm:
- IWatched:: [[Euphoria]]
I’ve gotten so far as making a table that displays my spending for that day using this query:
TABLE WITHOUT ID
file.link as Date, split(Spending, " - ")[0] as Where, split(Spending, " - ")[1] as Amount, TotalSpending as Total
FROM "Diary/Daily Notes"
FLATTEN Spending
WHERE file.name = this.file.name
Table looks like this:
Where I’m getting stuck is I would like to either (A) create a running total in the total column so the last row displays the total amount spent that day, or (B) just create an inline query that displays the total spending for that day.
I thought I could do this using the sum() function, but my tables break every time I attempt it. I’m assuming I’m not using the best methodology to achieve what I’m aiming to achieve.
Does anyone have any thoughts or ideas on how I can better accomplish this?
Thanks in advance!