dbTalk Databases Forums  

PeriodToDate on two dimensions

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


Discuss PeriodToDate on two dimensions in the microsoft.public.sqlserver.olap forum.



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

Default PeriodToDate on two dimensions - 06-16-2004 , 09:24 AM






I have a cube with a Year dimension and a Month dimension (allows me to set
the year as a Page field and the month as a column field). I am trying to
calculate a Past Due amount without success. Here is my calculated member:

Sum(PeriodsToDate([Month].[(All)],[Month].PrevMember), [Measures].[Cost]) +
Sum(PeriodsToDate([Year].[(All)], [Year].PrevMember), [Measures].[Cost])

I was hoping to get sum of all months for previous years plus the sum of
months up to the previous month for the current year. What I am getting is
the sum of months up to the previous month for all years (previous and
current).

Thanks,
Nate.



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

Default Re: PeriodToDate on two dimensions - 06-16-2004 , 10:00 PM






Try explicitly specifying the 2nd dimension in each sum:

Quote:
Sum(PeriodsToDate([Month].[(All)], [Month].PrevMember),
([Measures].[Cost], [Year].CurrentMember)) +
Sum(PeriodsToDate([Year].[(All)], [Year].PrevMember),
([Measures].[Cost], Month].[All Months]))
Quote:

- Deepak

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


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.