Relative Change Expressions

Summary

  • Relative Change Expressions evaluate the type of change made to a cell's data
  • All are boolean and return true if the change meets the desired criteria
  • They are available in the Flashing Cell and Alert Modules

Relative Change Expressions examine the nature of changes made to a cell's data.

AdapTableQL provides 3 Relative Change Expression Functions to deal with different use cases:

  • ANY_CHANGE
  • ABSOLUTE_CHANGE
  • PERCENT_CHANGE

Any Change

The ANY_CHANGE function checks if any change whatsoever has been made to a cell's value.

Hint

This is commonly used when setting up Flashing Cells

 // A data change of any value has been made to the Price Column
 ANY_CHANGE([PRICE])

Absolute Change

The ABSOLUTE_CHANGE function is used when you want to check if the change is of a certain amount.

It most commonly takes a (numeric) Column as the first argument.

Caution

The Column must be numeric as the evaluation only works on numeric values

 // Value in the Price Column has changed by more than 10
 ABSOLUTE_CHANGE([PRICE]) > 10

It is possible to use "INCREASE" to limit the evaluation to changes where new value goes up...

 // Value in the Price Column has increased by more than 10
 ABSOLUTE_CHANGE([PRICE], 'INCREASE') > 10

...or "DECREASE" to limit the evaluation to changes where new values goes down

 // Value in the Price Column has decreased by 5
 ABSOLUTE_CHANGE([PRICE], 'DECREASE') = 5

Percent Change

The PERCENT_CHANGE function is similary to ABSOLUTE_CHANGE, but used to evaluate the relative change in value.

It most commonly takes a (numeric) Column as the first argument.

Caution

The Column must be numeric as the evaluation only works on numeric values

 // Value in the Price Column has changed by more than 10%
 PERCENT_CHANGE([PRICE]) > 10

Again, you can use "INCREASE" to limit the evaluation to upward percentage changes...

 // Value in the Price Column has increased by more than 50%
 PERCENT_CHANGE([PRICE], 'INCREASE') > 50

...or "DECREASE" to limit the evaluation to downward percentage changes

 // Value in the Price Column has decreased by 10%
 PERCENT_CHANGE([PRICE], 'DECREASE') = 10

Find Out More

See Relative Change Alerts for more details and a demo showing how these functions can be used