Moving Diff

The MovingDiff function operates over a moving window of values, and returns the difference between the current value and the value at the beginning of the window. This function is similar to the MovingMax function. No “Weighted” or “Exponential” can be calculated for this function.

The MovingDiff function takes the following arguments:

MovingDiff (column, window, break_col)

where:

The following results would occur if you used the Moving Diff function with a Window of 3 (MovingDiff(Sales,3).

Table 179. Moving Difference Example

Month

Original Sales Values

3-Month MovingDiff Average

Jan

10

 

Feb

15

 

Mar

17

7

Apr

20

5

May

22

5

Jun

20

0

Jul

25

3

Aug

27

7

Sep

30

5

Oct

35

5

Nov

37

7

Dec

40

5