Hello!
I have a layer of parcel building sketches where each part of the building is a separate feature/record (over 259,000 features). This means the porch is one feature, the house another, the garage is a third feature, etc. I have a Parcel ID field (my primary key) that I need a count of unique values to get the summary total of parcels (not building sketch parts) for the county. The goal is to get the parcels summary total when you click on the county boundary in a pop-up. Then I can display this in the Details element of Dashboard. I do know I can get this information from ArcPro but the ultimate goal is to filter this data to display only the sketches that have been QA/QC reviewed by another department (it is a field in the parcel building sketches layer). They (department heads) want to see a live update of the number of parcels that have been reviewed on a continuous basis since its being reviewed by 6-8 people on a daily basis.
I am using this code but only get back a value of "1".
var sketchesReviewed = FeatureSetByName($map,"Building_Sketch_Check", ["parid"]);
var distinctSketches = Distinct(Intersects((sketchesReviewed), $feature))
var countSketches = Count(distinctSketches)
return countSketches
Any suggestion or help on where I am going wrong would be greatly appreciated. This code is written on the county boundary layer since that is the layer I want to configure the pop-up on. Thanks!