How to filter out vcpu.N.time

I collect vCPU data from virsh domains. Some virtual machines have 2 vCPUs, others have 16 and others somewhere between. I want to do a repeat on my dashboard, showing the individual vCPU.time of each vCPU. So I created a variable that queries how many vCPU field I have: “SHOW FIELD KEYS”. This however cannot (from what I understand), be limited to the selected (another variable) virtual machine or domain as virsh calls them. So it will always return the maximum amount of vCPUs any domain has.
So now the repeat shows me 16 vCPU panels in my dashboard, of which 2 only might have content.
So my next step was to transform and hide this panel in case no data is present. This however stumbled upon the problem that transforms can’t have variables used in them, so I can’t make the condition to check whether it has data or not.

What’s the right way to do this?