I have a journal that has one line for a bank charge and then several lines with AP-account on a vendor.
These AP-lines/Payments have been applied to one or many vendor transactions.
I'd like a search that shows me the total of the AP-lines per journal and also a column for open amount.
I have created a search that shows this correctly by individual journal line as I can take the max of the {amount} and subtract the sum of appliedtolinkamount and applyinglinkamount.
But when I want to create a total per journal I get into the issue where I can't sum({amount}) as it will sum up the duplicate values that occur since some lines are applied to multiple transactions.
Ideally I'd like to "sum(first {amount} based on lineuniquekey)"
Any tips?