What I’m trying to do
Hi,
-
I am manually documenting trades I make in a daily note (thoughts, ideas, emotions). The file name is the current date of that day in the format dd.MM.yyyy (lets call them mind notes)
-
I also download a CSV document weekly from my broker where every single transaction is listed to review my trades (data notes)
-
I am trying to merge data notes into mind notes as there is always one mind note for the day but many data notes for each transaction
-
The goal is to automatically prepare that final file for future queries with the help of templetar
Things I have tried
- With templetar I was able import my CSV file to obsidian and convert each line of transaction into one note. A day can have many transaction so the output looks like this
Data Notes Folder
- 21.06.2023 9_22
- 21.06.2023 10_14
- 21.06.2023 10_18
- 21.06.2023 13_14
- 20.06.2023 08_24
- 20.06.2023 09_36
- 20.06.2023 11_56
Mind Notes Folder
- 21.06.2023
- 20.06.2023
-
The columns of the CSV files are converted into frontmatter so my Data Notes have a date field as metadata dd.MM.yyyy hh:mm and as file name dd.MM.yyyy hh_mm
-
My Mind Notes have no date field as frontmatter yet since the filename is already a date (I suppose)
-
I want to merge my files to make it easy to query them in the future and I am not sure how to go about it. The following is screenshot of a work in progress query
dataview
TABLE file.day, tags, maxprofitup, maxprofitdown, blindasrs, movedslbe, type, embed(link(rows.cover, "300")) as Cover, rows.amount
FROM "Mind Notes" OR "Data Notes"
WHERE type = "trade"
SORT file.day ASC
GROUP BY file.name
-
Atm I just manually add a type=“trade” field to have a common query and group by file.name. But I feel like there should be a more elegant way to go about my endeavor.
-
Is it even necessary to merge my files or should I just work with queries to select for my data
-
Or is ist better to have one file with clean metadata
-
My goal is to analyze trades with queries. Therefore I will add more fields later or consolidate them
-
As you can see in the screenshot by grouping I’m already running into problems, because now my query needs to have rows.amount to show content
-
Im worried that if I don’t start with a clean approach now its gonna be a mess once I add more and more queries, fields and trades
So any guidance how to go about this would be very appreciated. I hope my use case description is somewhat understandable.
Thanks
Michael
Another Example Query: