I want to subtract the last and the first document from a timerange to check how much engergy was consumed. So i make a lens with a formula like this :
(last_value(value.value_float32) - min(value.value_float32)) . I take the min value because it seems there is no function for the "first" document. The syntax works, but only for ca. 11 hours.
After that, the result of the min document is zero. so the visualtion will shw the "last" document. I checked the documents after 11 hours and there is no one document with a zero.
welcome to the Kibana community.
In Kibana 8.7 the "previous" shift feature has been introduced which will allow you to perform a difference between the last value of the current time window and the previous one:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.