Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Rolling 13 Week Calculations using In-DB formula

$
0
0

 

Hi Team

 

Hoping someone here can shed some light on the right way to approach this problem

 

I have a medium size data set that I need to calculate a rolling 13 week sum.

 

My data is stored in a SQL server table and to calculate I currently stream the data out and then process the calculation using the Multi-Row Fomula Tool.

 

The problem is Streaming the data out & then back in to write back to a new table causes a significant bottleneck on the workflow and it is taking about 7 hours to process 13 weeks of data.

 

Is anyone able to provide an example of an in-db fomula which can calculate a rolling sum (with some grouping options) 

 

Any suggestions welcome

 

 

Data is structured similar to the below:

 

 

WeekProductQty Sold
16/08/201512310
16/08/20155555
23/08/20151237
23/08/201555578
30/08/201512312
30/08/20154443

 

 


Viewing all articles
Browse latest Browse all 4999

Trending Articles