Moving Median

The MovingMed function operates over a moving window of values. For each Window, the MovingMed returns the middle value (in terms of rank) found in the Window. If the Window value is an even number, the simple mean value of the two middle ranking values should be used. No “Weighted” or “Exponential” can be calculated for this function.

The MovingMed function takes the following arguments:

MovingMed (column, window, break_col)

where:

  • column(required)—Specify the column that contains the numeric fact on which the Moving Function column value is calculated. If you are applying the function from the Pivot section, you can only use a column that has already been added to the Facts pane of the data layout.

  • window(optional)—Specify a moving “window” of values from the Column on which the Moving Function gets calculated The window value must be a positive integer of value equal to or less than the total number of rows in the Column (within any Break Column value).

    If the window value is an interger of greater value than the number of values in the Columnthen the window value defaults to the number of rows in the Column (within any Break Column value). If no window value is specified, then the window value defaults to 3.

  • break column (optional)—Specify the name of the column on which to perform the Moving Function calculation. The break column refers to the rows of similar valued data cell within the Pivot or Results section.

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

Table 171. MovingMed Function Example

Month

Original Sales Values

3-Month MovingMed Average

Jan

10

 

Feb

15

 

Mar

17

15

Apr

20

17

May

22

20

Jun

20

20

Jul

25

22

Aug

27

25

Sep

30

27

Oct

35

30

Nov

37

35

Dec

40

37