Datatable config case help, sum from start to today

Assuming i have data as follow in ES,
Date Qty
2016-12-01 1
2016-12-01 1
2016-12-02 1
2016-12-04 1

then i need a data-table in Kibana 5.0, sum Qty from the very start to end of today
Date Qty
2016-12-01 2
2016-12-02 3
2016-12-03 3
2016-12-04 4

any suggestion would be appreciate. :slight_smile:

You can't do this with a data table with Kibana, but you could set this up in Timelion and use the cumulative sum function.

1 Like

hi, can i cusum a field value? seem the default is counting row count

You need to specify the sum aggregation for your metric in the .es() function. Try something like:

.es(index=my_quantities_index, timefield=my_date_field, metric=sum:my_quantity_field).cusum()

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.