If there are more than one attribute in either the row or column attribute box then pivotData.forEachMatchingRecord is not returning any values for the marginal totals including the grand total. Using ...