Calculate Field (GeoAnalytics)


Creates a layer with calculated field values.


  • This geoprocessing tool is available with ArcGIS Enterprise 10.6 or later.

  • Calculate Field is completed on tables or point, line, or polygon features.

  • Calculate Field will always create a layer. It will not modify the input. You can only calculate values for a single field at a time.

  • You can calculate values for an existing field or for a new field you add by creating a unique field name.

  • Expressions are created using Arcade expressions.

    Learn more about GeoAnalytics Server Arcade expressions with Calculate Field

  • Arcade expressions can be track aware. Track-aware expressions require that data is time enabled and of time type instant and that a track field is specified. To learn more about building track-aware expressions, see Track aware examples.

  • To include a track-aware calculation, you must do the following:

    • Use a layer that is time enabled and of time type instant.
    • Check the Track Aware check box.
    • Select the fields used to identify tracks.

  • Tracks are represented by the unique combination of one or more track fields. For example, if the flightID and Destination fields are used as track identifiers, the features ID007, Solden and ID007, Tokyo would be in two separate tracks, since they have different values for the Destination field.

  • Applying a time interval boundary segments tracks at a defined interval. For example, if you set the time interval boundary to 1 day, starting at 9:00 a.m on January 1, 1990, each track will be truncated at 9:00 a.m. every day and analyzed within that segment. This split is accelerates computing time, as it creates smaller tracks for analysis. If splitting by a recurring time interval boundary makes sense for your analysis, it is recommended for big data processing. Your analysis must be track aware to set a time boundary.

  • In addition to the calculated field, the output may include the following new field types:

    • ObjectID
    • GlobalID—If results are stored in the spatiotemporal data store.
    • datetime—If results are temporally enabled. The new fields are instant_datetime for time type instant, and start_datetime and end_datetime for time type interval.

  • You can improve performance of the Calculate Field tool by doing one or more of the following:

    • Set the extent environment so that you only analyze data of interest.
    • If you are using tracks, split your tracks using the Time Boundary Split parameter.
    • Only select Track Aware if your expression includes a track expression.
    • Use data that is local to where the analysis is being run.

  • This geoprocessing tool is powered by ArcGIS GeoAnalytics Server. Analysis is completed on your GeoAnalytics Server, and results are stored in your content in ArcGIS Enterprise.

  • When running GeoAnalytics Server Tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Server may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.

    Learn more about sharing data to your portal

    Learn more about creating a big data file share through Server Manager

  • Similar analysis can also be completed using the following:


CalculateField(input_layer, output_name, field_name, field_type, expression, {track_aware}, track_fields, {data_store}, {time_boundary_split}, {time_boundary_reference})
ParameterExplanationData Type

The input features that will have a field calculated.

Record Set

The name of the output feature service.


The name of the field that will have values calculated. This can be an existing field or a new field name.


Specifies the field type for the calculated field.

  • STRINGThe new field will be of type text.
  • INTEGER The new field will be of type integer.
  • FLOAT The new field will be of type float.
  • DATE The new field will be of type date.

Calculates values in the field. Expressions are written in Arcade and can include operators and multiple fields. Calculated values are applied in the units of the spatial reference of the input unless you are using a geographic coordinate system, in which case they will be in meters.

Calculator Expression

Specifies whether the expression will use a track-aware expression.

  • TRACK_AWAREThe expression will use a track-aware expression, and a track field must be specified.
  • NOT_TRACK_AWAREThe expression will not use a track-aware expression. This is the default.

One or more fields that will be used to identify unique tracks.


Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored in the SPATIOTEMPORAL_DATA_STORE will be stored in WGS84. Results stored in a RELATIONAL_DATA_STORE will maintain their coordinate system.

  • SPATIOTEMPORAL_DATA_STOREOutput will be stored in a spatiotemporal big data store. This is the default.
  • RELATIONAL_DATA_STOREOutput will be stored in a relational data store.

A time span to split your input data into for analysis. A time boundary allows you to analyze values within a defined time span. For example, if you use a time boundary of 1 day, starting on January 1, 1980, tracks will be split at the beginning of every day. This parameter is only available with ArcGIS Enterprise 10.7 and later.

Time Unit

The reference time used to split your input data into for analysis. Time boundaries will be created for the entire span of the data, and the reference time does not need to occur at the start. If no reference time is used, January 1, 1970, is used. This parameter is only available with ArcGIS Enterprise 10.7 and later.


Derived Output

NameExplanationData Type

The new output with calculated values.

Record Set

Code sample

Calculate Field example 1 (Python window)

The following Python window script demonstrates how to use the CalculateField tool.

# Name:
# Description: Calculate the mean of the 3 most recent speed measurements in hurricane tracks

# Requirements: ArcGIS GeoAnalytics Server

# Import system modules
import arcpy

# Set local variables
inFeatures = ""
newField = "MeanSpeed3"
outFS = "HurricaneTracks_Mean"
trackIdentifier = "Name"
calcExpression = "Average($track.field['WINDSPEED'].history(-3))"

# Execute Reconstruct Tracks
arcpy.geoanalytics.CalculateField(inFeatures, outFS, newField, "Double", 
                                  calcExpression, True, trackIdentifier)


Output Coordinate System

The coordinate system that will be used for analysis. Analysis will be completed in the input coordinate system unless specified by this parameter. For GeoAnalytics Tools, final results will be stored in the spatiotemporal data store in WGS84.

Licensing information

  • Basic: Requires ArcGIS GeoAnalytics Server
  • Standard: Requires ArcGIS GeoAnalytics Server
  • Advanced: Requires ArcGIS GeoAnalytics Server

Related topics