I built a dashboard that pulls from a feature layer with a related table that holds survey submissions. I would like to do calcs using values from both the parent table and related table.
I would like to take the count of all values from a field named "Remediation_Complete" that equal "Yes" from the related table and subtract that number from the total number of sites in the parent table. I'm thinking of something like this (pseudo code):
var RemComp = Count(FeatureLayerName, FieldName =="Yes") #calls the parent layer, calls the field name and counts all values that are equal to "Yes."
var TotalSite = Count(ParentTableName, ObjectID) #Calls the ParentTable and counts the total amount of records
return TotalSite -RemComp # Takes the total number of sites and subtracts the amount that have remediation completed and displays the amount left to be addressed.
Is there a way to do this in Arcade or Python?