Does anyone know of a way to display only current non-zero stats of multiple devices in a performance graph?

I have a group of devices that i want to show in a performance graph, but i only want to include devices that have a non-zero value for the metric. This way I can display the legend and it will only have non-zero devices and not the 500 devices I’m monitoring that are all at zero. I’ve been playing with the performance graphs and trying to dig into the {{values}} but there is no way to set that as a filter or criteria.

R. Brian English selected answer