dbTalk Databases Forums  

MDX assistance required

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


Discuss MDX assistance required in the microsoft.public.sqlserver.olap forum.



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

Default MDX assistance required - 05-31-2004 , 10:36 PM






Hi

I am trying to sum values cumulatively in a cube using the PeriodsToDate function. The function below works well when applying to all fact table records. However, each record in the fact table is classified as one of three types. I would actually like the sum function to add only the facts pertaining to two of the three types

I have tried Filter() and other combinations. The closest I can get is hard-coding one of the two status member names into the second half of the PeriodsToDate formula, but then I'm missing the other one... I know the answer is a simple one but I just can't crack it

Any and all assistance appreciated
Cheers
Nic

sum
PeriodstoDate([Transaction Date].[(All)], [Transaction Date].CurrentMember)
([Account Category].CurrentMember,[Measures].[Amount]
)

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: MDX assistance required - 06-01-2004 , 01:30 AM






Assuming that [Account Category] is the type dimension:

Quote:
Sum({[Type 1], [Type 1]},
Sum(PeriodstoDate([Transaction Date].[(All)],
[Transaction Date].CurrentMember),
([Account Category].CurrentMember,[Measures].[Amount])))
Quote:
- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #3  
Old   
NickB
 
Posts: n/a

Default Re: MDX assistance required - 06-01-2004 , 09:01 PM



That's exactly what I was missing. Thanks Deepak, much appreciated!

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.