What I’m trying to do
First off, please, I am very new to Obsidian and Dataview. I may be missing the obvious, or using wrong terms. I have spent a good half day trying to search and figure this out with no luck.
I have a page with multiple instances of metadata. When I create a table from the page and this data I get multiple rows of data. I want to essentially have columns in my table that are computed from the other columns. However when I try to do this I get errors that imply the columns are arrays and thus I can’t do the math.
No implementation found for 'array * array'
Things I have tried
Here is an example of some of my data. This is all in a single note:
[Name:: Walnut]
[Thickness::0.125]
[Finished:: no]
[Depth:: 12]
[Width::20]
[Cost::31.00]
[Name:: Maple]
[Thickness::0.125]
[Finished:: yes]
[Depth:: 12]
[Width::20]
[Cost::22.00]
What I am trying to do is for example a computed column that is Depth * Width to give me the total square inches. EG:
TABLE
Name,
Cost,
Width,
Depth,
Width * Depth
FROM #supplier
This will give me the error previously mentioned. I CAN do something like:
TABLE
Name,
Cost,
Width,
Depth,
Width[0] * Depth[0]
FROM #supplier
And that will work but of course it will only give me the correct value for the very first entry. I tried to find some sort of index I could use that represents the current row but I couldn’t find such a thing.
I think normally the layout people would use here is to break these up into separate notes and it works differently then? I really want to put multiple instances in the same note so I Can have a note per supplier and each note has multiple products.