Skip to Content
May 04, 2022 at 12:19 AM

Crosstab Total formula help

99 Views Last edit May 04, 2022 at 12:42 AM 2 rev


There are two tables involved in the correct Total column. Currently the column total uses a formula to

summarize the ExtAmount in the InvoiceDetail table. Formula: {AR_InvoiceHistoryDetail.ExtensionAmt}

What I need is to add is the SalesTax, Discount and Freight amount found in the InvoiceHeader table.

If I modify the formula as shown.

{AR_InvoiceHistoryDetail.ExtensionAmt} + {AR_InvoiceHistoryHeader.FreightAmt}+ {AR_InvoiceHistoryHeader.SalesTaxAmt}+ {AR_InvoiceHistoryHeader.DiscountAmt}

Results below.


It looks like the header freight, tax and discount values are summarizing incorrectly. They need to be summarized by client, and it appears the calculation is way off.

How can I summarize the total line item amounts by customer invoice, then add the freight, sales tax and discount?

Then total those values in the crosstab.


Any comments would help

Thanks for looking.


crosstab.jpg (92.1 kB)
crosstab2.jpg (93.2 kB)