Take/calculate value from dashboard

Is it possible to calculate value directly from a dashboard?

The short answer is "no" -- you can't do this directly from a dashboard. However, you can achieve this using a TSVB visualization (which can then be embedded in a dashboard).

What you're looking to do is called a bucket script aggregation, which is not yet supported in our standard agg-based visualizations, but can be done using TSVB as shown here. Another more detailed example can be found in this thread: