Grafana panel - How to filter records as part of the legend format that do not have value

I have a grafana with Prometheus defined as a source In one of the panel I’m running the following query : nifi_amount_items_queued{exported_instance="$host", job=“NIFI-BE”}

As part of the results I’m getting few records, this is an example of 2 records:

nifi_amount_items_queued{instance="nifi-be-lab6",component_type="Connection",component_name="retries_exceeded",component_id="a9961223-0176-1000-a7ed-3a0031a198ba",parent_id="de791d5d-1017-1175-05b6-ea9f2500be20",source_id="01761001-0129-1c29-b87b-c595ff0e36cf",source_name="RetryFlowFile",destination_id="a995e49a-0176-1000-faa4-833e9cc0b4da",destination_name="DEBUG FAILED MESSAGES",} 374.0

nifi_amount_items_queued{instance="nifi-be-lab6",component_type="ProcessGroup",component_name="Publish to Kafka Lab",component_id="de791d5d-1017-1175-05b6-ea9f2500be20",parent_id="d54619e3-0171-1000-5e0a-9430ce741fb6",source_id="",source_name="",destination_id="",destination_name="",} 374.0

In the grafana i have defined the follwoing in the legend format : {{source_name}}–>{{destination_name}}

In the graph result, i’m getting both records - My goal is to remove the record where destination_name or source_name ="" (Like i have in the second record)

Please advice

Hi @duduconfirm,

Apologies here but because this question is such a visual one, can you maybe attach two screenshots? One of your legend as it appears and a second showing what you want to appear instead? I hope that’s clear!