I'm trying to create a box showing the days remaining for our inspections. The variables are not working, specifically the filter and average.
var TotalPoles = $datapoint.count_OBJECTID_12_13;
var TotalHours = $reference.sum_hours_worked;
var PolesInspected = Filter(TotalPoles, 'inspection_type is NOT NULL')
var PolesRemaining = Filter(TotalPoles, 'inspection_type is NULL')
var PolesPerHour = PolesInspected/TotalHours
var AverageHours = Average(TotalHours, 'hours_worked');
var DaysLeft = PolesRemaining/(PolesPerHour*AverageHours)