In ArcGIS (ArcMap 10.8 or Pro 2.6) I have a table of 4000 buildings (rows). Each row/building belongs to one of fifty groups and thus has a group ID of 1-50 in the field GROUP_ID. Each row also has a GROUP_STATUS field which can have the value of "fully open" or "partly open".

Some groups have conflicting statuses. For example, there are multiple rows in Group_ID = 10, 14, or 40 which have values of both "partly open" and "fully open" in GROUP_STATUS. For these, and all other groups that have the same issue, I need to change the status to only "partly open". I need to find out for which GROUP_IDs this is the case so I can update the status accordingly.

Without doing a frequency table - only a selection or definition query - how do I identify all GROUP_IDs that have different values for GROUP_STATUS in the table?

I would like to find rows where GROUP_ID = a single value and GROUP_STATUS = more than one value across the rows, along the lines of "select by GROUP_ID where GROUP_ID is consistent but GROUP_ID is not consistent."

  • 1
    Is the data stored locally (e.g.shapefile, FGDB) or in an Enterprise Database? In the latter case it's probably easier to query the database directly. – Berend Jan 22 at 8:23
  • 1
    It's possible to use a DA SearchCursor to build a dictionary in Python, then an UpdateCursor to adjust values, but using Summary Statistics is far easier. – Vince Jan 22 at 13:22
  • @Berend: it's stored locally – maps_spam Jan 22 at 16:11

A frequency table is exactly what you need to use.

In the Summary Statistics tool, set

  • Statistics Field to group_status
  • Statistic Type to COUNT
  • Case field to group_id

In the resulting table, select either records where COUNT_group_status = 1, or COUNT_group_status != 1

If you want, you could then join the Houses table to the Statistics table, ni order to select buildings directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.