0

In Grafana Postgres Datasource has been integrated. For the report Generation, I have added Variables, for example, type. I have used case when clause in this variable filter. case when type 0 then "ZERO" when type 1 then "ONE", when type 2 then "TWO" Variable filter works fine in the reporting. In the variable, there is an option to choose All and multi-value. Again in the Postgres query where clause, I need to convert this to integer, case when type "ZERO" then 0 when type "ONE" then 1, when type "TWO" then 2. When I select single value in the filter, ONE or TWO it works fine. When I select All in the filter, it appends ZERO, ONE, TWO in the value. The query became case when type "ZERO, ONE, TWO" then 0 Is there any possible way or remove the option to choose multi value and all from the Grafana variable? Thank you in advance.

user1631072
  • 51
  • 2
  • 9

0 Answers0