This is due to a common misunderstanding of how a Cross Table works. The "Grand Total" of a row or column in a Cross Table is not the sum of the elements in that row or column. The "Grand Total" columns and rows in a Cross Table are actually "grand aggregation" columns and rows. That is, they are the result of applying exactly the same aggregation method or custom expression to the entire data set represented by the column or row in the Cross Table as has been applied to produce the values in each of the cells in that column or row. This means, for example, that a "Grand Total" for a column of Averages is actually a Grand Average, and a "Grand Total" for a row of Medians is actually a Grand Median. This is also true for each row and column "Subtotal" in a Cross Table.
Note: There is an existing enhancement request in the TIBCO Ideas Portal to be able to use different custom expressions in cross table totals which would allow for more flexibility in how they are calculated. This feature can be voted for here: