OACS : Moving Average
We are trying to calculate 5 day Moving average for Sales data. Sample data and expected result as below.
We are using MAVG function of OACS. However we cannot pass group by Product to this function which is skewing the results of Product P2 and P3.
Example : Without the group by clause, Product P2 is picking up rows from P1 in calculating the MAVG and this results in incorrect results.
Any suggestions will be of great help.
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):