// Compare to a target and return the relative percent
// Example usage: Comparing sales to budget or forecast to get relative performance
// Examples:
// - 9/10 is -10% or -1
// - 11/10 is +10% or +1
(
// The actual value that you are measuring
actualMeasure : SCALAR NUMERIC VAL,
// The target that you are comparing to
target : SCALAR NUMERIC VAL
)
=>
VAR _Actual = actualMeasure
VAR _Target = target
VAR _Delta = _Actual - _Target
VAR _Percentage = DIVIDE ( _Delta, _Target )
RETURN
_Percentage