Got it. So, assuming that you've only got one inspection per quarter, you could use the First function. Also, since you're wanting the inspection results in your output, we need to include that in the FeatureSet.
Thinking about it more, too, we can include some SQL in the Filter function to get the appropriate quarter without the need to create additional variables.
var CD = FeatureSetByRelationshipName($feature,"InsTable",["InsDate", "inspection-results-field"]);
// Filter for certain months of 2021
var CR = Filter(CD, "InsDate < '09/01/2021' AND InsDate >= '05/01/2021'")
if(Count(CR) > 0){
return First(CR)["inspection-results-field"]
} else {
return "No Data"
}
- Josh Carlson
Kendall County GIS