My tables are structured as follows: Order (Parent) > Daysheet (child) > Materials Used (Grandchild)
A Daysheet may have related Materials Used of the same product entered multiple times and the same Materials Used may also be linked to numerous Day Sheets.
When an Order is closed I need to send an email that can be used for data entry into an accounting system so it needs to show a sum of Materials Used from all the related Day Sheets and I am not sure how to do that.
At present I am using the following expression but it only gives me a list of all the related Materials Used, often with duplicates, but I don’t know how to group and Sum them by Materials Used. Any suggestions?