Trends metric, it's possible?


(Aurélien) #1

Hi,

I want to create a metric in kibana dashboard, which use ratio of multiple metrics and offset period.

Example :
Date Budget
(YYYY-MM-DD) $
2019-01-01 15
2019-01-02 10
2019-01-03 5
2019-01-04 10
2019-01-05 12
2019-01-06 4

If I select time range between 2019-01-04 to 2019-01-06 , I want to compute ratio with offset period: 2019-01-01 to 2019-01-03.

to resume : (sum(10+12+4) - sum(15+10+5)) / sum(10+12+4) = -0.15
evolution of my budget equal to -15% (and this is what I want to print in the dashboard)

But, with metric it's not possible (no offset), with visual builder: different metric aggregation do not have different offset (too bad because bucket script allow to compute ratio), and with vega : I not found a solution too.

Any idea ? Thanks a lot
Aurélien


(Marius Dragomir) #2

I don't really think you can do that for now. Maybe using Canvas SQL expressions would work.