I need to calculate an indicator based on the features the user selects in the map. The calculation involves summing up the squares of all of the values of the selected features. How do I iterate through the selected features (datapoints) to square them before summing them all together?