Promql counter metric - Table Visualization Issue

HI Everyone,

I have a Prometheus counter metric to present total and failed calls to an API and using a table panel to visualize it. The problem with this is -

  1. If I change time range in Grafana from 24h to 3h the new data shows as expected however an immediate refresh of dashboard nullifies all the values in the table or changes the value drastically
  2. This happens with any time range i select

Sample query : sum by(label1) ((metric name{condition1=”123”}[$__range]))

Snap1: Below values are as expected.

Snap2: Immediate refresh nullifies the value or changes the value drastically

I updated the query type here from range to instant since refering the grafana documentation since the format of data required was not a time series data but a single value. The data now is showing correct in my tabular plugin How to easily retrieve values from a range in Grafana using a stat panel | Grafana Labs

1 Like