I have two type of note: Mission and Phase. I use composed:: to link Mission to Phase, I have several Phase for one Mission. On both notes, there is the duration property.
So I am looking for a way to check if the sum of the duration of Phases (related to a specific Mission) is less than the duration of the Mission that are linked to Phase through composed::
In order for someone to help you, add:
Example YAML with properties, and what types of values you have or are expected (check types.json file in .obsidian folder for the prop in question).
Will save your helper time, as you might have string where number expected, etc.
Add here also some of the earlier tried queries.
If you create a prompt for AI, you also need to tell the bot what you have.
Give yourself a chance to get help.
Also, when you add here anything, make sure you add it in
So if all of your duration values use the recognized duration format, such as [duration::2.5 days], and each of your composed properties contains one link to one phase note, such as:
```dataview
TABLE WITHOUT ID
file.link AS "Mission",
duration AS "Mission duration",
composed AS "Phases",
composed.duration AS "Phase durations",
sum(composed.duration) AS "Sum of phase durations",
choice(duration >= sum(composed.duration), "Okay", "<span style='color: red'>Phase durations exceed mission duration</span>") AS "Duration check"
WHERE composed
```
But if that’s not your note structure, then try to give more info about it, like Yurcee said .