Pivot BAQ with grand totals column

I created a Pivot BAQ for supplier totals by company. The BAQ is showing the totals correctly. How can I add a Total field after the company columns? Is it even possible?

That will have to be a separate calculated field in a subquery.

I have tried to add a calculated field and even a another subreport to sum by supplier. In both cases the report was showing each supplier 6 times, once per company instead of showing one per row.

Make sure your group by on the sub query is only using Vendor ID (assuming they are consistent across companies) and not company or VendorNum in the likely case that VendorNum is different by company.

Yes, the VendorIDs are the same across companies. I just noticed that Pivot BAQ is not summing correctly also.

This can get time consuming but what I usually do is build the base query, then build a union query duplicate that has the totals along the bottom, another union for the row totals (on the right) and another for the grand, grand total (bottom right corner). Each of the queries has a hidden sort column to keep them stacked correctly. It’s a brain teaser.

Thank you, I will definitely try it.