Hi Esri community,
I have two fields that represent different event categories, each denoting the year a given event category occurred.
I want to calculate a new field that will list the field name of the event type with the maximum value (latest year).
Is there any way I can do this?
Event_type1 ; Event_type2, last_event_type
1984 1972 event_type1
Thanks for any help!!
- Also, I posted this in the Python community because I thought there might be a script that could perform this action, but if there is a better geonet community for this question please let me know.
Quickly off the top of my head something like this. Are you trying to do this in a field calculator or in a script?
Event_one = "Event_type1"
Event_two = "Event_type2"
Last_Event = "last_event_type"
if Event_one > Event_two:
Last_Event = "Event_type1"
Last_Event = "Event_type2"
Try Calculating the field using Expression Type Python.
if (x > y):