Hello Again folks,
I feel I may be exhausting my question limit - much appreciation to the community - I am looking into a course.
I'm trying to summarize a field in arcade and get statistics from the other fields for a result similar to this:

Is this possible in Arcade?
I have looked a Paul Bakers post and the Spanish one and many others but I just can't seem to make anything work
I think Groupby is the option but I just don't know get the sums from the other fields
also do I need to use intersect as I want to get results from the whole dataset if so I can intersect with the municipal border as all developments are within
I got this far with this expression (excuse the radon variables!):

var intersectArea = Intersects(FeatureSetByName($map,"Planning_Layers - Development Applications"), $feature)
var treeList = groupBy(intersectArea, "PRStatus",
{name:"count", expression:"PRStatus" , statistic:"COUNT"})
var topFeatures = Top(OrderBy(treeList, "count desc"),10)
var treeList = ''
for (var topFeature in topFeatures) {
treeList += topFeature.PRStatus + " (" + topFeature.count + ")" + TextFormatting.NewLine
}
return treeList
Thanks again
Aaron