AWS Redshift dynamic nodes

I have 3 redshift clusters in a dashboard.
cluster 1 has 2 nodes
cluster 2 has 4 nodes
cluster 3 has 12 nodes.

The dashboard has a panel for cpuutilization of all nodes and configured metric up to 12 compute node.
So thing is,
Here’s how it works:
#Since cluster 2 has only 4 nodes it may display 12 nodes in the dashboard but if you click compute 0,1,2,3 and leader it will show data. And other node names (compute 4,5, …11) will show blank since the cluster has only 4 nodes. Applies to cluster 1 as well.
#On the other hand for cluster 3 you can see data for all the 12 nodes (compute 0 to 11) since the cluster has 12 nodes.

What I need is - If I select the cluster 2 from the dropdown in dashboard it should display only 4 nodes in the panel and not 12. How to make this work dynamically?

Probably a naive question but new to Grafana.
Thanks in Advance.

It looks like you have a query per node? I don’t know that much about Cloudwatch, is it possible to use a template variable instead of NodeID=Compute0?

You can repeat rows or panels based on a template variable.

Here is an example on the demo site

If you can get a list of NodeID’s from a template variable, then you should be able to create one panel and then repeat it by setting the Repeat Panel field:

And then use that template variable in the query instead of hardcoding “Compute-x”.