ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: vivianteoh on January 08, 2020, 01:22:52 pm
-
May I know is there a way to sum percentage correctly?
See sample below:
(https://imgur.com/fWpAwJR.png)
I have a formula (column B / column A) * 100%. If the result column is summed, the result is shown as 113.06 but what I want is (total of column B / total of column A) * 100% = 0.77.
May I know is there a way to do so?
-
It can be done by writing a column.render callback for affected column and override the cell value in summary row.
column.render = function(ui){
var rd = ui.rowData;
if(summary row ){
return rd.B/rd.A * 100
}
}
-
Thanks. Will try this out.