Hi Arramack,
How about
TagName= "Your Tag" Value=* | Eval Quality=if(Quality=="good", 192, 0) | timechart span=1s sum(Value) as Value, sum(Quality) as Quality by TagName | filldown
This will only work for one tag but if you couple with a input filed, you can have a dropdown for all 5000 to select them one by one. I am not exactly this is the best way to visualize for so many tags. What you can consider is having clones of the table, i.e. Clone 10 of this table for 10 Tags on your dashboard.
... View more