AnsweredAssumed Answered

Counting "unique" selections across repeats

Question asked by monarchmonitoring on Apr 10, 2019
Latest reply on Jun 1, 2020 by dougbrowning

OK, here's the deal. I am trying to create a field that will count the total number of plant species observed in a plant survey. The survey has 100 subplots (repeating form 1-100). Each subplot repeat and has a nested repeat that asks observers to choose all the plant species found in that subplot. I can use count(${plant_sp}) to get the total number of plant species selected throughout the survey, but I want to count only the number of unique species selected in the survey. This is to find the species richness of the site.


For example, if there is a daisy, coneflower, and hawkweed in every subplot, I need the count to be 3 and not 300. There are literally hundreds of possible choices for each subplot.


Is there a way to pull the number of unique codes from a concatenated list of all the species codes #from a
join(' ,' ${plant_sp}) perhaps?