Klipfolio. The KPI Dashboard - Evolved
The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Displaying a sum or an average

Problem:

You want to display sum or average of the values in a column.

Solution:

Use the CSS property formula to display either the sum or the average of all values in a specified column. Note that type: number must be used for the columns for which you want to use a formula.

Once the formula is specified for a column, a horizontal line is drawn under the last item in the Klip, with the result of the formula displayed under it by default.

To display the sum of the values in the column, use formula: sum:

oranges {
    type: number;
    itemcol: 1;
    formula: sum;
}
To display the average of the values in the column, use formula: average:

oranges {
    type: number;
    itemcol: 2;
    formula: average;
}    

If you want to use the formula property but do not want to display the result under the horizontal line, use showresult: false.

To have the Klip calculate and display the results of your own mathematical formula, see Using your own formula and displaying its result.

Leave a Comment

To leave a comment, you must sign in or register (it's free).

   
Comment Type:
Title:
Comment: