How can I get the most recent value in a 'Metric'

Hello all!

Currently trying to get the most recent value of a transactiondurationtime. I got a data table with the

name of transaction, average transaction duration, recent transaction duration (which I need to have/calculate)

I only get the options such as average, count, max, min but not recent. There is an advanced option for a JSON input but I cannot find a way to get this working. The field name is transactionduration.

Hi @Negan Welcome to the community.

What version are you on?

Can you give some samples of your data and what you want for the expected results?

Hi yes;

testname.keyword, transactionduration (average)
test1, 5.158
test2, 5.018
test3, 5.14

And now I want for each test1, test2, test3 the most recent transactionduration in milliseconds.
more than this I cannot give away for data.

in Aggregation-based visualisation (the one you show) you can use a "top metric" aggregation on the field you want (transactionduration) sorted by timestamp descending. It does what you need.
You can also (even easier) do the visualization in Lens, there is a Last Value function for that.

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