Only 1 value shows instead of 2 values - env variable

I’m configuring a grafana dashboard variable using custom variable type and I’m separating the values based on comma like this:

The variable returns correct value. However, the sql panels weren’t working properly. To troubleshoot, I used the variable query in panel and this is what I found

Troubleshooting steps:

  1. I changed custom variable to query type. Still only 1 value shows in query.
  2. I removed the space next to ‘Option’ to see if that’s causing the issue. But the issue continue to exist.
  3. Sometimes quoting the variable in single quotes works and some other time, it doesn’t
    select concat(name, '--', id) from boards where name IN ('${board_name}')
    or
    select concat(name, '--', id) from boards where name IN (${board_name})

Any solution is appreciated.




Thank you. This isn’t working for me. As you can see, when I inspect the query using ‘Query inspector’ it displays only ‘Option one’ whereas in the variable as attached above, it shows two variables