Calculated member help -
11-15-2004
, 12:04 PM
This has been doing my head in and any help would be much appreciated. I have
a time dimension which contains days, weeks and years. I have an
openingStockValue measure. I don't want this to roll up as the opening stock
for week 45 is the stock on the 1st day of week 45 only. The following
calculated member gives me my opening stock.
(Measures.[OpeningStockValue], OpeningPeriod ([ReportDate]))
I've used the openingPeriod function to say, "give me the stock on the first
ReportDate (day) within the current period". However, I also want closing
stock now and that's not in the fact table. So I want the opening stock of
the next subsequent period. In other words for week 45 I want the stock on
the first day of week 46. Likewise if I rolled up to year, the closing stock
for 2004 would be the stock value on 01 Jan 2005 when that arrives. I'm
struggling to work this out. Any help much appreciated.
DK |