dbTalk Databases Forums  

Calculated member help

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Calculated member help in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DaveK
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.