I have an index "consump" having as fields : category, timestamp, costs.
I want to display in Kibana Canvas, a bar chart exhibiting cumulative sum(costs).
In other cases I used "timelion" for that like this: "
query=".es(index=consumption*, metric=sum:COSTS, timefield=@timestamp).cusum()" interval="1d" from="now-1M" to="now"
The problem in this case is that calculating the sum(costs) is not straight forward : for example if I need to calculate the SUM(costs) of the current month I need to do such query(since it is a blended cost):
GROUP BY "category""
| math "round(sum(costs),2)"
So, here in this case the sum of the costs will be equal to 5+6+2=13
I want to build a bar chart where : y_axis=cummulative_sum(costs) and x_axis=timestamp
So, can you please help me on how to proceed with such case.