Select to view content in your preferred language

Dashboard Indicator box

438
1
Jump to solution
12-28-2023 12:31 PM
AmandaHutsel2
New Contributor

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)

 

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

The problem that you're running into is the Filter function requires a FeatureSet, but you're providing it with a value ($datapoint.count_OBJECTID_12_13). That's the same issue you're having with the Average function.

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

The problem that you're running into is the Filter function requires a FeatureSet, but you're providing it with a value ($datapoint.count_OBJECTID_12_13). That's the same issue you're having with the Average function.