
Set(Invoice_total, Sum( Filter(Expense_Reimbursement_Lines, expense_header_id=SelectedReport.ID), invoice_amount));
Delegation warning. The highlighted part of this formula might not work correctly on large data sets. The “Sum” operation is not supported by this connector.

Set(Invoice_total, With({
_invoice:Filter(Expense_Reimbursement_Lines, expense_header_id=SelectedReport.ID)
}, Sum(_invoice,invoice_amount)
));