Convert queries into one line queries and escape all commas , with backslash \. All commas in queries must be escaped beacuse comma is used in Custom variable to separate different queries (i.e. CPU, MEM). E.g. my queries would become:
2. Add dashboard variable of type Custom (Settins ā Variables ā New variable). Under Custom options add all one line formated queries (i.e. CPU and MEM) and separate queries with comma ,. You can also add labels that will show in drop-down instead of raw query e.g. CPU and MEM. So, final query that you should add in Custom options would look like:
If you found dynamic queries useful please support Grafana feature request that would allow usage of different delimiters, prefixes and suffixes for multi value variables. This would allow even better dynamic queries since you would be able to create queries with multi value variables. Feature request can be found on: