I am searching since few days a solution to display the earliest and latest value from a chart into a dashboard.
here is my query;
<query>index=main Name=volume_* | chart sum("Used Capacity TB") AS "Used Capacity TB", sum("Total Capacity TB") AS "Total Capacity TB" by _time span=7d</query>
I would like to extract the earliest and latest value and then substract the latest-earliest divided by the number of days.
earliest is 50
latest is 52
the calculation will be
52-50 = 2
2/7d = 0.286