Table Panel - How to colour cells according to stat functions over the data (like mean, median, etc)?

Please see attached for my desired effect. The overall mean of all the data in table is 0.28 (right-bottom of the table), and I would like a cell with value:

  • less than 0.5 * mean: Red
  • 0.5 * mean to mean: Amber
  • greater than mean: Green

My query can return anything I need (including statistical results over the data) in any way. The problem is how to make the colouring scheme for each cell refer to a value not displayed in that cell.

1 Like

Hi,

Please check the configuration on table stat panel from the playground, it has the configuration for coloring based on values.

https://play.grafana.org/d/U_bZIMRMk/table-panel-showcase?tab=query&editPanel=3&orgId=1

Hope it helps, good luck

Thanks wlargou. However your solution only allows me to set the thresholds based on [min, max] of the data in the table, whereas I would like to set thresholds based on average of the data. Is that achievable at all with the current Grafana?

Hi,

I’ve found similar requests for dynamic threshold, unfortunately it’s still not implemented as of my knowledge.

Check this :

Good luck, hope you will figure another approach/panels to achieve what you are looking for.

Thank you