Sum of last complete Bucket as a single metric

im looking for a way to display the sum of all values from the last complete bucket of a timeseries.
the idea is to display the current sum of all memory ,cores ,requests,disk space, etc. used for a server farm in a table visualisation, to get a overview for a drilldown.
for a tsvb graph, you set 'drop last bucket' and display the series sum of 'max used heap' per agent.hostname:

and you get the number in the legend.
how can i get this number in a 'markdown' or 'table' display? (markdown is problematic as it only allows you to gather 2 metrics )

If you know the bucket size (for example, a day, or 30m), would it be ok for you to use Lens in 8.5 (it will be released in 1-2 weeks?

You could use metric or datatable visualization and formula:

And for tsvb you can use math to calculate your value not inside markdown but before: