0

I try to find the MAX value for every distinct element in a dataset (I done this using MAX in summary statistics) but I also want to have the id of the element corresponding of that MAX in my output table. Do you have any idea?This is an ilustrative example of what I want to obttain. Until now, I have only IN_FID and MAX_VALUE on my output table using summ. stat. tool; but I also want INSTITUTION

  • 2
    Are you willing to use the python window to set up a quick search cursor? Just a couple lines of code would give you the answer. – CStarbird Jan 26 '16 at 0:22
  • the problem is that I don't know python – Silviu Jan 26 '16 at 8:49
1

The non-python method of achieving what you're looking for would be to use a definition query to single out an institution type, like "police". The definition query would look like this (for shapefiles)...

"INSTITUTION" = 'police'

Then sort your table by "value" in descending order. The "FID" with the highest value will be at the top. You would have to perform this process for every institution type.

1

When using the summary statistics tool have you tried selecting IN_FID from the drop down under the Case field? Its the last option when you are using the Summary Statistics tool. This should give you the MAX_VALUE and IN_FID fields in a table.

  • Yes, I did that. But I also want another column with the institution that correspond to that MAX_VALUE – Silviu Jan 29 '16 at 13:45
  • You can add multiple columns with the Case field option. – LEB7782 Feb 2 '16 at 14:02

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.