Hi all
I am trying to carry forward the YTD transactional data to next consecutive months with in the FY.I can get the aggregated value using Partition By/ Order by function but couldn't carry forward to consecutive months if they don't have any transaction.
Below is the scenario:
Product Name org date total order net sales
abc a01 1/1/2013 200 100
def d01 1/3/2013 100 100
abc a01 1/25/2013 100 100
abc a01 2/5/2013 100 50
def d01 3/2/2013 50 50
abc a01 4/5/2013 100 100
abc a01 7/5/2013 100 100
When I am sending the data on july 8th it should look like:
Abc ao1 1/1/2013 300 200
Def d01 1/1/2013 100 100
Abc ao1 2/1/2013 400 250
Def d01 2/1/2013 100 100
Abc ao1 3/1/2013 400 250
Def d01 3/1/2013 150 150
Abc ao1 4/1/2013 500 350
Def d01 4/1/2013 150 150
Abc ao1 5/1/2013 500 350
Def d01 5/1/2013 150 150
Abc ao1 6/1/2013 500 350
Def d01 6/1/2013 150 150
Abc ao1 7/1/2013 600 450
Def d01 7/1/2013 150 150
:
I really appreciate your help..Thanks,