Goal: In a table at a project level, we need to sum two amounts that are aggregated at different levels.
-
Budget for the project (needs to be deduplicated using the budget_month_id)
- We are using: min(budget, [budget_month_id]) to deuplicate
-
Sum of invoices for the project (needs to be deduplicated using the invoice_id)
- We are using: min(invoice_amount, [invoice_id]) to deduplicate
The problem arises when trying to sum these two amounts at a project level (project_id)
What we tried: A calculated field using sumOver() - results in an error. We believe we might be using this formula wrong.
What’s the best approach to sum these two amounts?