Doing this on the original data is going to be hard or impossible.
The two possibilities I see:
Use SQL
Create a Query Layer or Database View. In a very basic form:
SELECT PointName, Max(Value) AS "MaxValue"
FROM Featureclass
GROUP BY PointName
Use Attribute Rules
Create a new point feature class. Needs a value field.
On your original point feature class, create an Attribute Rule that edits the newly created fc, something like this (untested):
// Calculation Attribute Rule on original point fc
// field: empty
// triggers: insert, update, delete
// load the label point fc
var labels = FeatureSetByName($datastore, "LabelPoints", ["OBJECTID", "Value"], false)
// intersect the label fc with the active $feature
var label = First(Intersects(labels, $feature))
// create empty arrays to hold commands to add, update, or delete features in the label fc
var adds = []
var updates = []
var deletes = []
// if we're inserting or updating a point and there is no label point there, add it
if($editcontext.editType != "DELETE" && label == null) {
var new_label = {
"geometry": Geometry($feature),
"attributes": {"Value": $feature.Value}
}
Push(adds, new_label)
}
// if we're inserting or updating and there already is a label point there, update its value
if($editcontext.editType != "DELETE" && label != null) {
var updated_label = {
"objectID": label.OBJECTID,
"attributes": {"Value": Max(label.Value, $feature.Value)}
}
Push(updates, updated_label)
}
// if we're deleting a point and there are no other points in that location, delete the label
if($editcontext.editType == "DELETE" && label != null) {
// load the point fc
var points = FeatureSetByName($datastore, "Points", ["OBJECTID"], false)
// intersect with label
var points_at_location = Intersects(label, points)
if(Count(points) == 1) { // only the current $feature, no other points
var deleted_label = {"objectID": label.OBJECTID}
Push(deletes, deleted_label)
}
}
// return, this instructs the gdb to insert, update, or delete a feature in the label fc
return {
"edit": [{
"className": "LabelPoints",
"adds": adds,
"updates": updates,
"deletes": deletes
}]
}
Have a great day!
Johannes