title: Display table for series with label's occurrence count greater than N in Prometheus
body: <p>In Prometheus, given below metric definition, how do I render a table for top 5 recurring devices part of the metric series?</p>
  
  <pre><code>top_5_noisy_devices:
  
      { "device" : "1234", "type" : "foo"}
      { "device" : "1234", "type" : "foo"}
      { "device" : "1234", "type" : "foo"}
      { "device" : "2345", "type" : "foo"}
      { "device" : "4231", "type" : "foo"}
      { "device" : "4354", "type" : "foo"}
  </code></pre>
  
  <p>I want to render a table in Grafana for the above labels to show that device 1234 is the noisy device in the selected time duration.
  I tried topk operator but it renders more than 3. ( I see 100's of rows in table instead of just 3) 
  <a href="https://www.robustperception.io/graph-top-n-time-series-in-grafana" rel="nofollow noreferrer">https://www.robustperception.io/graph-top-n-time-series-in-grafana</a> claims to support topk in Grafana. But I fail to understand how to adapt it to a table.</p>