Kibana, filter data on the basis of one field and then grouping values on basis of timestamp (yearly)

一个人想着一个人 提交于 2019-12-12 03:30:01

问题


I have three fields in my data: tran_date, use_case, Amount.

use_case field having multiple values i.e. B2B, cash_in, C2C etc.

I want to plot a bar chart by sum up Amount field against use_case (B2B, cash_in only) then want to group data on yearly basis . so there will be a bar for each year summing up the Amount against use case B2B, cash_in.

I explored filter and sub-buckets but they don't seem to provide grouping of values.


回答1:


"sub buckets" create aggregations, which are groupings. Setup your x-axis as a Date Histogram on @timestamp, then add a sub-bucket using Terms for use_case. To get the sum, edit the y-axis (metrics).



来源:https://stackoverflow.com/questions/35764519/kibana-filter-data-on-the-basis-of-one-field-and-then-grouping-values-on-basis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!