BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Example ABC | Example DEF | Example GHI | Grand Totals (Averages) | |
Total | Total | Total | Total | |
Example 123 | 2 | 4 | 6 | 4 |
Example 456 | 5 | 5 | 5 | 5 |
Grand Totals (Summation) | 7 | 9 | 11 | 9 |
Currently, I have each value set to average, so i only need to "override" the aggregates at the bottom to reflect a summation. I'm hoping I can "override" the values either in an event (load, enginePopulating, enginePopulated, dataBound, ...) or in a cellTemplate.
I appreciate any suggestions or advice in achieving the desired functionality.
Thanks
enginePopulated: function(args) {
var sumValue =0, count =0;
for(var i=0; i<args.pivotValues.length; i++){
for(var j=0; j<args.pivotValues.length; j++){
debugger
if(args.pivotValues[i][j]!= undefined && args.pivotValues[i][j].axis == "column" && args.pivotValues[i][j].formattedText != "Grand Total")
count++;
if(args.pivotValues[i][j]!= undefined && args.pivotValues[i][j].axis == "value"){
if(j==(args.pivotValues.length-1))
args.pivotValues[i][j].value=args.pivotValues[i][j].formattedText = sumValue/count;
else
sumValue += args.pivotValues[i][j].value;
}
}
sumValue =0;
}
} |