Y-axis aggregation over the output of X-Axis data


#1

Hi,
I am having an index like {_Id:number, value:float, timestamp, propertyvalue:string}. There are multiple documents over a long period of time. The propertyvalue is a string which is repetitive across the index.

I want a graph with X-axis as a BiWeekly bucket on timestamp, split the bars on propertyvalue and display the value field on Y-axis for the latest timestamp document in the particular interval.

Eg: For time interval between 10-Oct to 24-Oct there are a 100 documents with 3 unique propertyvalues in the list. I want only the latest document for each property value from the bucket to be extracted & the value for corresponding document to be plotted on Y-axis.

Value Timestamp Property
1324.00 2016-10-21T10:00:12.64 P1
669.00 2016-10-21T10:00:11.21 P2
1586.00 2016-10-21T10:00:09.74 P3
1.00 2016-10-21T07:40:08.15 P1
0.00 2016-10-21T07:30:06.80 P2
1324.00 2016-10-21T07:00:08.93 P3
669.00 2016-10-20T19:50:08.00 P1
1.00 2016-10-20T19:52:06.79 P2
1688.00 2016-10-20T20:55:05.83 P3

After going thru some discussions found that displaying a value on Y-axis is not possible in Kibana & instead, found some suggestions to use avg/sum by getting only a single document for the interval.

I am trying the same in visualization, but the Y-axis aggregation seems to happen on the whole bucket(bi-weekly interval bucket split on propertyvalues)
instead of being applied on the document with the max timestamp from the bucket.
So when selecting max value on Y-axis, instead of selecting 1586 for P3 for the latest timestamp bucket, it displays 1688 for P3.

Any suggestions will be helpful. Please let me know if need to provide any other samples.

Thanks


(CJ Cenizal) #2

Hi Addy,

I have good news for you! We currently have a PR in review that adds this functionality: https://github.com/elastic/kibana/pull/7302. Please watch it for progress!

Thanks,
CJ


#3

Hi CJ,

Thanks a lot for the reply.
The PR does match our use case perfectly. I will keep following.

Just an add-on question to that, As and when a PR is completed, how soon is it available for download. Or do we wait for the next Kibana release to include the new features?


(CJ Cenizal) #4

Hey Addy,

After a PR is merged it will usually become available in the next minor release of the current version (except in the case of critical bugfixes, which become available in the next patch release). Though of course, since this is OSS, you can also download, build, and run the feature branch before it's even been merged.

In fact, I'm sure the authors of the PR would appreciate any feedback you may have, so if you do have time to test it before it's merged, that would be terrific!

CJ


#5

Great. I will try to download and check it on my end.
Thanks CJ for your prompt replies.


(system) #6