Custom variable type not working. Does not narrow down resources

I have imported a dashboard and the custom variable ‘TopResources’ does not seem to be working. For instance, when I select ‘3’ for TopResources it does not narrow it down as expected. It still displays all the results instead of the top 3.

  • What Grafana version and what operating system are you using?
    Grafana v7.3.0

  • What are you trying to achieve?
    I am trying to narrow down the top resources and not have all resources appear in panels.

  • How are you trying to achieve it?
    Using a Custom variable that helps narrow down the top resources

  • What happened?
    It does not narrow down the resources.

  • What did you expect to happen?
    I expected it to narrow down the results.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Datasource is Prometheus
    query: topk($TopResources, netapp_volume_avg_latency{datacenter="$Datacenter",cluster="$Cluster",svm=~"$SVM",volume=~"$Volume"})

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Hi @joperez08

Welcome to the Grafana forum! Just to clarify: you said you imported a dashboard. Does the query work when you hard-code that value? Do the other variables work? Does this work:

topk(3, netapp_volume_avg_latency{datacenter="$Datacenter",cluster="$Cluster",svm=~"$SVM",volume=~"$Volume"})

It’s not uncommon for imported dashboard not to work right out of the box. Which dashboard did you import?