![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Assuming AS 2000, a cube measure: [CensusCount], and user selection of a date on the Calendar dimension, the MDX for the calculated measure: [OpeningBal] could be like: Sum(PeriodsToDate([Calendar].[(All)]), [Measures].[CensusCount]) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Since it sounds like you're using AS 2005, you might try explicitly specifying the Hierarchy current member, like: Sum(PeriodsToDate([Calendar].[Calendars].[(All)], [Calendar].[Calendars].CurrentMember), [Measures].[CensusCount]) (assuming that the date is selected on this hierarchy). - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Ashok, It's hard to say without looking at the Attribute Relationships in your [Calendar] dimension, but I suspect that there may be an issue with the modelling of weeks. Unless you're using an accounting calendar, weeks don't roll up exactly to months - they may span 2 months. Will it work down to the day level, if you remove weeks from the Calendar hierarchy? - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |