How to visualize data with the latest date

Hi all,

How to create a visualization that takes into account only documents with the latest date? Let's say I have documents with three fields:

  • Name
  • Status
  • Date

And now I would like to create a chart (Name vs Status,) but only for documents with the same date - the latest one.

Something similar in SQL:
SELECT Name, Status FROM Documents WHERE Date = (SELECT TOP(1) Date FROM Documents ORDER BY Date DESC)

Thank you

Hi there,

Unfortunately, this isn't currently possible in Visualize. You can't express that type of "WHERE" clause to limit on a subaggregation. There's something similar in our metric agg, called Top Hit, which you can use to retrieve the last timestamp for a given term, but that isn't usable as a filter.

If you'd like to this kind of functionality added to Kibana, could you file a request on GitHub? Thanks!

CJ

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