Hide series conditionally

We are plotting ‘source bit rate’ for channels. The graph appear as below which is not clear. We need it to have only unhealthy channels (based on some threshold say source bit rate is 5Mb/s). However the current graph shows 120 series(lines) as there are 120 channels which makes it noisy. Is it possible to hide series if it is in healthy threshold range and plot only if it falls in unhealthy range. We want to see only unhealthy channels (improve visualization)

Grafana Version: 7.4.5
Datasource: Cloudwatch
SEARCH(’{AWS/MediaConnect, FlowARN} (MetricName=“SourceBitRate” AND (*channel1 OR channel2 OR channel3 OR channel4 … OR channel120)) ', ‘Average’, 60)


Please can you give a clearer indication of what defines “healthy” or
“unhealthy”, and also tell us whether this information (“this channel is
unhealthy”) is contained in your data source, or is it something Grafana needs
to work out for itself based on the query results?

Can you give an example of a query which would tell us whether a channel is
healthy or not?


I have given query and sample data to define unhealthy in the description itself (say source bit rate less that 5Mb/s)

*hope this could help
if I were you, I would play around the query.
*Im not familiar with Cloudwatch, so I’ll just give you some logic to begin with:

treshold = 5Mb/s
*lower than 5Mb/s = unhealthy = want to show lines
*higher than 5Mb/s = healthy = no need to show lines

in the query, put if logic on it
if(series 1 < 5Mb/s then series1 else null) AS “series 1”


in my query I have lots of series, but in the next picture only 2 series appear in the graph

this behavior is affected by a variable called $webView at the top
and then on the next picture, multiple series appear