dbTalk Databases Forums  

MDX Expression to Create a Total Time To Date Calculated member

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


Discuss MDX Expression to Create a Total Time To Date Calculated member in the microsoft.public.sqlserver.olap forum.



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

Default MDX Expression to Create a Total Time To Date Calculated member - 11-03-2004 , 02:30 PM






I am trying to create a calculate measure that will sum all time periods to
date.

So if I have a cube that has data for 2000 - 2004 and I select January of
2004, I would want this member to return the sum of 2000 January through 2004
Januray.

Any thoughts on how to do this?

I have tried adding a member that sums all time periods together (Total
Time). This allows me to use the PeriodsToDate() function and it works
correctly at the year level. However, I cannot get that to pass down to the
months.

Please let me know if you can think of any options.

Thank You

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

Default RE: MDX Expression to Create a Total Time To Date Calculated member - 11-03-2004 , 04:39 PM






ytd(Month)

"nsteffin" wrote:

Quote:
I am trying to create a calculate measure that will sum all time periods to
date.

So if I have a cube that has data for 2000 - 2004 and I select January of
2004, I would want this member to return the sum of 2000 January through 2004
Januray.

Any thoughts on how to do this?

I have tried adding a member that sums all time periods together (Total
Time). This allows me to use the PeriodsToDate() function and it works
correctly at the year level. However, I cannot get that to pass down to the
months.

Please let me know if you can think of any options.

Thank You

Reply With Quote
  #3  
Old   
Mark A Morris
 
Posts: n/a

Default RE: MDX Expression to Create a Total Time To Date Calculated member - 11-03-2004 , 04:49 PM



oops never mind - did not read properly.

sum(periodstodate([Time.Standard].CurrentMember.LEVEL.Members, [Year Current
Time Evaluation Function]), [YOUR MEASURE])

[Year Current Time Eveluation Function]
can be something like this if you have a property on each level indicating
current period:

Filter([Time.Standard].CurrentMember.LEVEL.Members,
[Time.Standard].Properties("Current") = "-1").item(0))







"nsteffin" wrote:

Quote:
I am trying to create a calculate measure that will sum all time periods to
date.

So if I have a cube that has data for 2000 - 2004 and I select January of
2004, I would want this member to return the sum of 2000 January through 2004
Januray.

Any thoughts on how to do this?

I have tried adding a member that sums all time periods together (Total
Time). This allows me to use the PeriodsToDate() function and it works
correctly at the year level. However, I cannot get that to pass down to the
months.

Please let me know if you can think of any options.

Thank You

Reply With Quote
  #4  
Old   
Martin Mason
 
Posts: n/a

Default Re: MDX Expression to Create a Total Time To Date Calculated member - 11-03-2004 , 09:14 PM



Could try something as simple as
Aggregate ( [Time].[Jan, 2000]: [Time].[Jan, 2004] )

"nsteffin" <nsteffin (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am trying to create a calculate measure that will sum all time periods to
date.

So if I have a cube that has data for 2000 - 2004 and I select January of
2004, I would want this member to return the sum of 2000 January through
2004
Januray.

Any thoughts on how to do this?

I have tried adding a member that sums all time periods together (Total
Time). This allows me to use the PeriodsToDate() function and it works
correctly at the year level. However, I cannot get that to pass down to
the
months.

Please let me know if you can think of any options.

Thank You



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.