Can you explain, with an example, the idea of inline queries?
Multiples entries in same day for the same field has a basic problem about arrays/list…
Simplifying with an example:
Pressure 1
Time:: 2022-01-10, 2:30PM
fieldA:: value A1
fieldB:: value B1
---
Pressure 2
Time:: 2022-01-10, 5:30PM
fieldA:: value A2
fieldB:: value B2
---
Pressure 3
Time:: 2022-01-10, 10:30PM
fieldA:: value A3
fieldB:: value B3
You can group all this elements, thinking they are related between them: A1 <-> B1, A2 <-> B2, A3 <-> B3, … But it’s a false idea.
Each field is related with the page/note. So, each field has a list of values:
Time:
- 2022-01-10, 2:30PM
- 2022-01-10, 5:30PM
- 2022-01-10, 10:30PM
fieldA:
- value A1
- value A2
- value A3
fieldB:
- value B1
- value B2
- value B3
The apparent relationship between them seems to be the order, nothing more. If, for example, I decide to sort by descending “Time”, the values in other fields don’t follow the new order, just because they aren’t related.
For now, with my limitations in dataview (don’t know js), to your case, working with multiple entries per day, I only found one way: working with only one field.
Taking this example (field sysdias for everything: systolic/diastolic / time):
# 2022-01-08
sysdias:: 140/89 / 09:15AM
sysdias:: 133/79 / 05:45PM
---
# 2022-01-09
sysdias:: 142/90 / 10:10AM
sysdias:: 128/82 / 07:22PM
---
etc.
Now the “weird” dataview query:
```dataview
TABLE WITHOUT ID Days, map(rows.sysdias, (s) => split(s, "/")[2]) AS time, map(rows.sysdias, (s) => split(s, "/")[0]) AS systolic, map(rows.sysdias, (s) => split(s, "/")[1]) AS diastolic, map(rows.sysdias, (s) =>choice(number(split(s, "/")[0]) < 120 and number(split(s, "/")[1]) < 80, "🟢 normal", choice((number(split(s, "/")[0]) < 120 and number(split(s, "/")[1]) >= 80 and number(split(s, "/")[1]) <= 89) or (number(split(s, "/")[0]) >= 120 and number(split(s, "/")[1]) < 80) or (number(split(s, "/")[0]) >= 120 and number(split(s, "/")[0]) <= 139 and number(split(s, "/")[1]) >= 80 and number(split(s, "/")[1]) <= 89), "🟡 elevated", choice((number(split(s, "/")[0]) <= 139 and number(split(s, "/")[1]) >= 90) or (number(split(s, "/")[0]) >= 140 and number(split(s, "/")[1]) <= 89) or (number(split(s, "/")[0]) >= 140 and number(split(s, "/")[1]) >= 90), "🔴 high", "error")))) AS level
WHERE sysdias
WHERE file.day.weekyear = number(split(this.file.name, "W")[1])
FLATTEN sysdias
GROUP BY file.link AS Days
SORT file.name ASC
```
And the test result in weekly note: