dbTalk Databases Forums  

Re: Aggregating Balance items vs P&L items

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


Discuss Re: Aggregating Balance items vs P&L items in the microsoft.public.sqlserver.olap forum.



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

Default Re: Aggregating Balance items vs P&L items - 07-10-2003 , 01:10 PM







Just a note, if you are in a business environment, the use of
ClosingPeriod is questionable. This function returns the LAST sibling
among the descendants of a member at a specified level. It could work
ONLY if cube loads are done EVERY day, including weekends.

In case of a "business days only" scenario, however, the provided MDX:

([Measures].[Inventory], ClosingPeriod([Time].[Day],
[Time].CurrentMember))'

may not give you the desired inventory snapshot because the last day of
a month (quarter, year) might as well turn out to be a weekend day, so
you'll get an empty value. Also, for the current month, it may
disappoint you too because there would be no value for the last day of
the current month.

Below is the alternative solution (provided you are going MDX as opposed
to the virtual cube solution):

SUM(Tail(Filter(Descendants(Time.Std.CurrentMember , [Time].[Std].[Day]),
NOT IsEmpty([Measures].[Inventory])), 1), [Measures].[Inventory])

It gets the last NON-EMPTY value for a given time member.

Thanks.
YB.

--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Mark Hill
 
Posts: n/a

Default Re: Aggregating Balance items vs P&L items - 07-11-2003 , 03:00 AM






Might as well wade in here, i couldnt help notice that Howard used
Reuters as one of the basis for his argument ... can i just say we use
the MDX approach , not the dual cube :-)

Mark Hill

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.