Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to calculate both Opening stock and Closing Stock from one field?
Closing Stock = sum(Closing_stock) of Jul 2013 i.e 10000
Opening Stock = 10000 of Aug 2013
i.e the value I get as Closing Stock of Jul 2013 is same as Opening Stock of Aug 2013
eg,
July 2013 Aug 2013 Sep 2013 Oct2013
Opening Stock 0 10000 5000 0
Closing Stock 10000 5000 0 2000
I am calculating Closing Stock as Sum(closing_stock) . the table has only one value closing_stock , depending on closing_stock I have to calculate Opening Stock.
Hi Kal,
Have one dimension (eg: Measure) to have value Opening Stock & Closing Stock.
Then create one expression for each month,
eg: expression for Aug 2013
if(Measure='Opening Stock', sum({<Month={'Jul 2013'}>} Amount),
sum({<Month={'Aug 2013'}>} Amount))
For Sep 2013
if(Measure='Opening Stock', sum({<Month={'Aug 2013'}>} Amount),
sum({<Month={'Sep 2013'}>} Amount))
rgds,
Abey