---
sourceDocument: Brazil Platform Analytics
sourceDocumentLink: https://www.servicenow.com/docs/r/now-intelligence

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Create a calculated field

# Create a calculated field for a Data snapshots source {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read  
Show the length of time that has passed between two date/time fields on a Data snapshots source table. For example, calculate Age as the difference between Created and Updated. Use this value as an aggregate field on an
indicator or in a bucket group mapping.

## Before you begin

Read [Bucket groups and calculated fields in Data Snapshots](https://www.servicenow.com/docs/FM6LcqlXglPoEmz23SuHxA "Bucket groups let you use numeric data as breakdowns. Calculated fields show numeric data derived from date fields. Map bucket groups to either numeric or calculated fields on Data snapshots indicator sources to use those fields as breakdowns."), particularly the Limitations section.

Role required: pa_data_collector or higher

## Procedure

1. Navigate to AllPlatform Analytics AdministrationBreakdownsCalculated Fields and select New.
2. In the Name field, enter a short, descriptive name.
3. **Optional:** In the Description field, provide more details about the calculated field.
4. In the Table field, select the table to which to add the calculated field.  
   The table should be used as a Data snapshots source.
5. In the Formula field, define a DATEDIFF function.  
   The DATEDIFF function has three parameters, which you specify in a comma-separated list without spaces.
   * Time unit, in the singular. Supported units are:
     * Year
     * Month
     * Week
     * Day
     * Hour
     * Minute
     * Second
   * Name of the field with the start time
   * Name of the field with the end time

   {#create-a-calculated-field__ul_afq_zv4_zjc}  
   Important:  
   Confirm that both the start time and end time fields are listed under Fields on the relevant Data snapshots source.  
   The format follows:

       DATEDIFF('unit',start_time_field,end_time_field)

   Note:  
   Use the technical field name, not the human-readable label. For example, use sys_created_on, not Created.

   Both the
   name and the formula must be unique. If either duplicates an existing calculated field, an error message is displayed and the record is not
   saved.
{#create-a-calculated-field__steps_ohb_m5k_hkc}

## Result

If both fields in a calculated field formula are listed as dimensions of a Data snapshots source, the calculated field is listed as Eligible on that source.

## Incident Age calculated field {#create-a-calculated-field__example_wwb_gdp_zjc}

You want to sort the indicator scores for incidents by age. There is no one field on the Incident table that tracks this. However, you determine that the difference between the Created date stamp and the Updated date stamp
provides a reasonable approximation. You can filter the scores by another condition if you want the ages of only active incidents, for example.  
You create a calculated field with the following values:

* Name: Age
* Description: The age of each incident at the time of its last update
* Table: Incident
* Formula: DATEDIFF('day',sys_created_on,sys_updated_on)
{#create-a-calculated-field__ul_lng_g2p_zjc}

The formula uses the technical names of the Created and Updated fields.
Figure 1. Calculated field for incident age  
Because the Created and Updated fields are both dimensions on the incident_dataset data source, Age is listed there as an eligible calculated field.Figure 2. Age as an eligible calculated field for incident indicators  
The Age calculated field is available to be used as an aggregate field on an indicator based on the incident_dataset source. For example, an incident indicator with the Average or Sum aggregation can use the Age field.  

## What to do next

To use the calculated field as a filter on KPI Details, map it to a bucket group.

You cannot delete a calculated field from the Calculated Fields list.
**Related reference**   

* [Data snapshots sources and collection](https://www.servicenow.com/docs/OeS~HZEzHd~fPEaRBiUOTA "Data snapshots include data sources for indicator score collection and the mapping between indicators and these sources.")

*[\>]: and then


