Select to view content in your preferred language

ArcGIS Pro Arcade Attribute Rules

495
1
Jump to solution
07-20-2023 10:54 AM
Labels (1)
Skysurfer
New Contributor II

I am trying to create an attribute rule that takes the values of a field named 'GIS_TractAcres', group them according to a shared ParentPropertyID, sum them, and add them to a field named GIS_PropertyAcres. All of these fields are within the same layer. I have tried the GroupBy function, but for some reason, it just doesn't work. Thanks for any help that anyone you can provide!

1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

I don't think GroupBy is exactly the right choice here. It does group the features, but then you still have to filter for your current ParentPropertyID. Might as well filter first and then call Sum().

var id = $feature.ParentPropertyID
var fs = Filter($featureset, "ParentPropertyID = @ID")
return Sum(fs, "GIS_TractAcres")

Have a great day!
Johannes

View solution in original post

0 Kudos
1 Reply
JohannesLindner
MVP Frequent Contributor

I don't think GroupBy is exactly the right choice here. It does group the features, but then you still have to filter for your current ParentPropertyID. Might as well filter first and then call Sum().

var id = $feature.ParentPropertyID
var fs = Filter($featureset, "ParentPropertyID = @ID")
return Sum(fs, "GIS_TractAcres")

Have a great day!
Johannes
0 Kudos