I have a spatial view of a valve feature and its related table. I used the below Arcade expression to symbolize the valves based on the last inspection date:
var DateDifference = DateDiff(Today(), $feature.InspectionDate, "month")
if (DateDifference <= 12){
return 'Within 12 Months'
}
else if(DateDifference <= 14){
return '12-14 Months'
}
else if(DateDifference == 14){
return '14 Months'
}
else {
return 'Over 14 Months'
}
Not all of the valves are being symbolized correctly, however.
The valve point feature is layered underneath the spatial join in the map, and its pop-up uses an arcade expression to show the last inspection date from the related table. In the screenshow below, you can see that a valve that was inspected 5 months ago is being symbolized as being inspected more than 14 months ago.

Any thoughts?