diff --git a/package.json b/package.json index 86b6d15..a4ac4ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasweet_formula", - "version": "1.1.2", + "version": "1.1.3", "description": "This Kibana plugin allows calculated metrics on any standard kibana visualizations.", "main": "index.js", "kibana": { diff --git a/public/decorators/lib/apply_formula_total.js b/public/decorators/lib/apply_formula_total.js index 5545164..52ca426 100644 --- a/public/decorators/lib/apply_formula_total.js +++ b/public/decorators/lib/apply_formula_total.js @@ -83,8 +83,9 @@ export function TableTotalFormulaProvider(Private) { const sum = tableRows => tableRows.reduce((prev, curr) => { // some metrics return undefined for some of the values // derivative is an example of this as it returns undefined in the first row - if (curr[i].value === undefined) return prev; - return prev + curr[i].value; + const v = get(curr[i], 'value'); + if (v === undefined) return prev; + return prev + v; }, 0); arr[i] = {