Need your help,
Please refer the below data structure. We want to calculate the and display moving average of the current value, previous 2 values, and the next value.
Input:
Month, Value
201501,100
201502,50
201503,50
201504,100
201505,50
201506,100
Output:
Month, Value,Moving_Average
201501,100,
201502,50,
201503,50,75
201504,100,62.5
201505,50,75
201506,100,
So the moving average per row would be calculated using the current row's value, previous 2 values, and the next value, displaying the average in the current row. (100+50+50+100=300/4=75). Can you please help form the Splunk search for this structure?
↧