Calculate percentage from two metrics

Hi Team,

I am using openTSDB as a data source for Grafana. I have a requirement to calculate the % of memory consume out of total memory.
In the dashboard, A metrics having UsedMemory value, B metrics having TotalMemory value. How to calculate the percentage for these two metrics.

Appreciate the quick help.


You have to do that in the query, use the expression api

Hello Torkel,

I am glad that you responded to my query. I am a pretty new to this grafana.

COuld you please tell how to get this Expression API and how to integrate this to my grafana.


Not sure it’s supported, maybe via filters? check OpenTSDB docs