Is there a way of calculating the number of unique text strings in a field in ArcGIS 10.1? I have a number of repeated strings in this field, but would like to calculate the number of unique strings in a field based on groupings from another field.
E.g – Current table:
Field 1 Field 2
Apple Green
Apple Red
Apple Red
Citrus Yellow
Citrus Green
Citrus Orange
Citrus Orange
Result:
Field 1 Field 2
Apple 2
Citrus 3
Best Answer
Two "summarize" operations will do it. This is a basic operation requiring no extra licenses.
First compute a field that concatenates
Field1
andField2
. (If your table is not editable or should not be modified, do these operations on a copy of it.) It's a good idea to delimit the concatenation; here I have used "|" as a delimiter.The summary of the
Concatenation
field, retaining the first occurrence ofField1
, will look likeFinally, the summary of
Field1
obtains what you want: