I’m using repeating panels and repeating rows. My dataset is production data for a mining application that shows production rates for each truck on a minesite. I have 2 variables, one for truckname and one for loadername. I’m using repeating panels to show each truck data, and repeating rows for each loader.
My query is
SELECT TOP(50) startTime as time, cycleProdRateBCM, deviceName FROM PitOps.dbo.tTruckProduction
where deviceName=${TruckName}
and loaderName=${LoaderName}
The rows are showing the loaders and the panels are showing the trucks, however the repeating panels are showing a panel for EVERY truck, even if there is no production data for that truck+loader combination, so my chart is very full. How can I remove the panels that have no data?
TruckName : select distinct deviceName from ttruckProduction
LoaderName : select distinct loaderName from ttruckProduction
How would I create a variable only for trucks that have production data?
All the trucks in the entire dataset will have some production data, but each truck only has production data for certain loaders (typically only 1 loader in a day), so for each loader (row) there will be different trucks (panels) shown
this is the table schema, below. This is my first attempt at a dynamic dashboard, actually this is my first use of Grafana so I’m still trying to work out how the various parts fit together
no, not exactly. every row in the table will always have both a truckname and loader name. but each loader will have different truck records, for example loader EX01 will have truck records for RD01, RD02, RD03, and loader EX02 will have truck records for RD04, RD05, RD06
Truck A will always be called Truck A, it never changes its name. Perhaps I can explain a bit better. On the mine we have “circuits”, a circuit is defined by the loader that is loading all the trucks on that circuit. Say a mine has 10 loaders (10 circuits) and 100 trucks. There would be 10 trucks “assigned” to each loader (in a very simple case). So the table will only contain production data for each loader for the trucks that are assigned to it. So if truck A is assiged to loader A and truck B is assigned to loader B then there will be records in the table for loaderA+truckA and loaderB+TruckB but never for loaderA+truckB
so the panels showing “no data” are the ones for loaderA+truckB and there won’t be any records with that combination
the only thing that can happen is that truckA may be re-assigned to loaderB in which case records will start to appear for truckA+loaderB, and I would assume that a new panel automatically appears for that combination