Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

getChange(String indicator, Object fromDate, Object toDate)

Returns the change in the score of an indicator between two specified dates.

NameTypeDescription
indicatorStringUnique identifier of the indicator for which to calculate the change.
fromDateObjectInitial date of the comparison.
toDateObjectEnd date of the comparison.
TypeDescription
NumberDifference in the specified indicator score between the two dates.

Change from the beginning of the month to the last collection period

In this example, we have the indicator Number of open incidents, whose scores are collected daily. The fromDate parameter is the first second of the current month, constructed by taking the timestamp of the last collection period (score_start), extracting the year and the month from the timestamp, and appending the numeral 01 for the day. The toDate parameter is the timestamp of the beginning of the last collection period, which would be the first second of the previous day, depending on timezone differences.

pa.getChange($[[Number of open incidents]], new GlideDateTime(score_start.getYear() + '-' + score_start.getMonth() + '-01'), score_start);

Parent Topic:PAFormulaUtils API

Related topics

getChangePercentage(String indicator, Object fromDate, Object toDate)

getCurrentAggregateID()

getCurrentBreakdownID()

getCurrentBreakdownLevel2ID()

getCurrentElementID()

getCurrentElementLevel2ID()

getGap(String indicator, Object onDate)

getGlobalTarget(String indicator, Object onDate)

getPersonalTarget(String indicator, Object onDate)

getScore(String indicator, Object onDate)

PAFormulaUtils API