If you are trying to do this with a calculation field defined in Invoices that uses Sum ( Invoices2::InvoiceTotal ), that won't work for a filtered portal as Sum will give you the total of all related records, not just those that meet the requirements of your filter.
You have two options here:
Use the global fields and inequalities you've placed in your filter expression as the actual fields and operators for your portal relationship. Then Sum will correctly compute the total.
Define a summary field that computes the "total of" your invoice total field. Create a second portal referring to the same table occurrence and using the same portal filter expression on your layout. Make this portal just a one row portal and place your summary field from Invoicess2 in this single portal row. This summary field, passed through the same filter, will compute your total for the specified date range of invoices.
Found it! I made two portals extra (with one row and one cell). I changed the formula from
Invoices2::date ≥ Invoices::gDateStart and Invoices2::date ≤ Invoices::gDateEnd
(Invoices2::date ≥ Invoices::gDateStart and Invoices2::date ≤ Invoices::gDateEnd) and f 2::card = "CARD"
(Invoices2::date ≥ Invoices::gDateStart and Invoices2::date ≤ Invoices::gDateEnd) and f 2::card NOT "CARD"
NOT is actually the NOT sign.