Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my attached model , why the opening stock expression is not working?
the above() functions is not working .
I want the output as this :
July 2013 Aug 2013 Sep 2013 Oct2013
Opening Stock 0 10000 5000 0
Closing Stock 10000 5000 0 2000
Better you calculate this in the script.
Aggregate the stock monthly and then sort it month wise, then use peek function to formulate the opening stock.
Something Like:
MonthlyStock:
Load
MonthlyStock,
Month,
Peek(MonthlyStock) as OpeningStock;
Load
Sum(Stock) as MonthlyStock,
Month
From <> group by Month Order By Month;