dbTalk Databases Forums  

How do we compute opening balances as calculated members ?

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


Discuss How do we compute opening balances as calculated members ? in the microsoft.public.sqlserver.olap forum.



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

Default How do we compute opening balances as calculated members ? - 10-10-2003 , 01:23 PM






Hi,

I have a fact table as follows:

Yr Mn Doc# Acct Transaction Amt
--------------------------------------------
2003 01 Document_1 Account_1 $10
2003 01 Document_2 Account_2 $20
2003 02 Document_3 Account_1 $100
2003 02 Document_4 Account_2 $200

Now when I create the cube, I want to be able to introduce a
calculated member called OB (Opening Balance). just so that, I can get
the following view:

Yr Mn Acct# OB Transaction Amt
--------------------------------------
2003 01 Account_1 $0 $10
2003 01 Account_2 $0 $20
2003 02 Account_1 $10 $100
2003 02 Account_2 $20 $200

Is this possible ? How ?

Thanks a lot.

Reply With Quote
  #2  
Old   
Wei Zhang [MSFT]
 
Posts: n/a

Default RE: How do we compute opening balances as calculated members ? - 10-28-2003 , 10:21 AM






Try:

WITH MEMBER Measures.[OB] AS
'Iif(Time.CurrentMember is Time.CurrentMember.Parent.FirstChild, 0,
(Time.CurrentMember.Parent.FirstChild, [Unit Sales])) '

Thanks

Wei Zhang
Microsoft OLAP PSS
This posting is provided "AS IS" with no warranties, and confers no rights.


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.