Defining a variable using a query does not work same way as hardcoded custom data

Hi,
I am working on a server with several csets defined.
Each cset have a number of cores.
I have made an prometheus exporter reporting the cores per cset as counters.
This makes it possible to create a query in the variable section.
I have created a variable called csets
This variable has the values:
19|21|23|25|51|53|55|57,9|11|13|15|17|41|43|45|47|49, 0|1|2|3|4|5|6|7|8|10|12|14|16|18|20|22|24|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|46|48|50|52|54|56|58|59|60|61|62|63

I try to graph one of the interrupt counters there is no data coming out.
The graph just says No data
Query looks like this:
rate(Core_tlb_shootdowns_interrupts{core=~"$csets"}[1m])

But if I create another variable called csets2 and manually define the same cores as custom data.


Then I can graph the interrupts.

Do someone have an explanation to why I get no data when I define the variable from a query?

I am only allowed to use two pictures so it makes it hard to show the difference.

Thanks
Mathias