Use a calculation field in the Invoices table =
Sum ( LineItems::cExtendedPrice )
and a summary field to total the field above.
Alternatively, base your list view layout on the LineItems table instead of Invoices, with no body part showing. Then the existing summary field will show the individual invoices amounts in the sub-summary by Invoice part, and the total in the grand summary part.
Use GetSummary ( summaryField ; breakField ) if you are not doing this via a relationship.
Where you have a summary field called Total or such and you sort by Salesperson to get a breakdown by salesperson the calculation will look like this:
GetSummary ( Total ; Salesperson )
You have to sort by Salesperson to get the calculation to work.
This is axactly what I am trying to do, but for some reason I can't seem to get the darn thing to do what I wan't. I can get a result in the "total" field, but not the right one. Perhaps I am using a wrong break field - or maybe something with the tables used??? I really can't make sens of it.
I have attached the database to the original post. If anyone would like to have a crack at it. It is a very simple database. The invoices is called "Faktura" in danish - and it is in the list view the problem is. I have made a field in the bottom that should summarize whatever is shown in the list.
Thanks in advance...
I have also tried this without any luck? Please see my answer to Lynsay.
That works perfect! What did the trick? Is it because the cSum and sTotal are in the same table as the layout? Or is it because the cSum pulls the value from the Summary field so you can summarize it again?
Anyway... thanks for all you help :-)
cSum does not "pull the value from the Summary field". There is no trick here. You simply cannot summarize a summary field, which is - quite correctly - the topic of your question. So you use a local calculation field to sum the related line items first, then a summary field to total the result.
OK I see what you mean. I meant that "Csum" gets its value from the field "fakturalinie_total" which is a summary field.
So doing it this way makes you able to summarize again. Leaning learning learning
I meant that "Csum" gets its value from the field "fakturalinie_total" which is a summary field.
No, that is not correct. cSum sums the values of fakturalinie_linietotal which is a Number field (and should be a Calculation field).
Oh - my mistake you are abolutely right! Now I see what's going on.
Thanks for the pointer!