decebals/wicket-pivot — pull request #14 by rototor (2014-08-20 16:51:28+00:00)
Title: FieldCalculations are not correctly calculated for the grand total

FieldCalculations are not correctly calculated for the grand total rows and columns. They have to be calculated using the FieldCalculation-function, as a sum of a percentage value is wrong.

i.e. old behavior:

Category | Value1 | Value2 | %(Value1 of Value2)
--------- | -------- | ---- | ------
A | 20 | 30 | 66,66
B | 50 | 56 | 89,28
GrandTotal | 70 | 86 | 155,94

This is just wrong.

Fixed behavior:

Category | Value1 | Value2 | %(Value1 of Value2)
--------- | -------- | ---- | ------
A | 20 | 30 | 66,66
B | 50 | 56 | 89,28
GrandTotal | 70 | 86 | 81,39

This calculation actualy only works if both operands of a field calculation are in the table. If Value2 is missing, the value of it will be 0.