Greetings,
I am trying to sum all of the features' 'WOCost' fields for a table with a field in common with my popup layer.
if instead of Sum function i run
Cost = First(FltrFtrs).WoCost
it returns a value. When i run sum (as below) it is throwing error:
var addy = 'UNIT 328 ~ KENWORTH 12 YARD DUMP TRUCK'
var WOs = FeatureSetByName($map,"Shop Costs",["WOCOST"], False)
var filterStatement = "WoAddress = '" + addy + "' and Description = \'Vehicles - General Repair\'"
var FltrFtrs = Filter(WOs, filterStatement)
var Cnt = Count(FltrFtrs)
var Cost = 0
if (Cnt > 0){
Cost = Sum(FltrFtrs, 'WoCost')
}else {Cost = 0}
Execution Error:Unnexected Result querying statistics from layer