Retail Predictive Application Server (MOSC)

MOSC Banner

Best approach to calculate/aggregate a Moving Average Stock

edited Aug 4, 2016 5:00AM in Retail Predictive Application Server (MOSC) 1 commentAnswered ✓

Hi All,

I am having a challenge on how to calculate a Moving Annual Average Stock in the aggregated levels.

Below some inputs:

Business definition: Total Stock for the past 53 weeks / number of weeks that has stock (moving/rolling week by week)

I have created 2 measures. Assuming a workbook will always contain 52 weeks.

Wp MACount = (tssum(if(BUWpEOIR != 0,1,0), first, current)+ tssum(if(BULyEOIR != 0,1,0), current, last)))

agg type: recalc

Note: This measure will calculate how many weeks there are stock. Not necessarily we can divide by 53 weeks the sum of stocks.

Wp MA Avg Stock = (tssum(BUWpEOIR, first, current) + tssum(BULyEOIR, current, last))/BUWpMACount)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center