Totals and Sub-Totals in Dashboard

Categories: How-To

Data Model manipulation

If you are accustomed to the data manipulation in Excel then the following features will instantly enable you to change your table appearance and data manipulation ability to the next level.


//you can add blank rows and columns and also Grand total using the following API
// data.addColumn(”XYZ”,4); /* to add a new column at number 4 with title XYZ*/
// data.addRow(6); /* adds a blank row at number 6 */
// data.addRowTotal(”Grand Total”, 1, -1 ) ; /* The first input is the total label, second is the column position where the label appears, the third is to indicate which columns to total => -1 to total all numeric columns

//you can also perform calculations on the result from the Query
//You can access columns by col[column_number], rows by row[row_number] and each cell by cell[row, col]
//each instruction should end with a semi colon “;”
//all instructions should be enclosed within the <calc> …</calc> statements, it can span multiple lines. Following is just an example

// <calc>
// col[3]=col[2];
// rowl[4]=row[2]+row[3];
// col[5]=col[2] + col[3] + col[4];
// cell[2,3] = cell[3,3] * cell[5,6];
// </calc>
// Please delete the above instructions once you are familiar with them as it may affect performance

data.addSubTotal(”Person #DATA subTotall”, 0, -1 ) ;
data.addRowTotal(”Grand Total”, 1, -1 ) ;


Comments are closed.