The values returned for a calculated measure that references a time series MDX function might not display the expected values when you have more than one hierarchy defined to the Time dimension.
For example, say you have defined a calculated measure using the following MDX:
Sum(YTD(),[MEASURES].[SUM_Actual_Sales])
For your Time dimension, you have two hierarchies defined: Year-Quarter-Month and Year-Month-Day, where Year-Quarter-Month is the default hierarchy. In the current view of the cube, you are referencing the other Time hierarchy, Year-Month-Day. In this scenario, the values displayed for the calculated measure as you drill down into Year-Month-Day might not be what you expect.
Specifically, when you display the Year-Month-Day hierarchy, the expression [Time].currentmember actually resolves to [Time].[default_hierarchy].currentmember. Recall that the default hierarchy is Year-Quarter-Month. The current member for Year-Quarter-Month is the All member. So, the All member value is returned for every member of the Year-Month-Day hierarchy. In this example, the expression resolves to:
SUM(YTD([Time].[Year-Quarter-Month].[All Year-Quarter-Month]),[Measures].[SUM_Actual_Sales])
To ensure that the correct value of [Time].currentmember is returned in your query, you must define your calculated measure to consider all hierarchies in the Time dimension and test to see which hierarchy is currently displayed.
Continuing with the current example, you could modify the MDX expression for your calculated measure to the following:
iif([Time].[Year-Quarter-Month].currentmember.level.ordinal > 0,
Sum(YTD([Time].[Year-Quarter-Month].CurrentMember),[Measures].[SUM_Actual_Sales]),
Sum(YTD([Time].[Year-Month-Day].CurrentMember),[Measures].[SUM_Actual_Sales]))
Operating System and Release Information
| SAS System | SAS OLAP Server | z/OS | 9.1 TS1M2 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M2 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M2 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M2 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M2 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M2 | |
| Microsoft Windows 2000 Server | 9.1 TS1M2 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M2 | |
| Microsoft Windows NT Workstation | 9.1 TS1M2 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M2 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M2 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M2 | |
| Microsoft Windows XP Professional | 9.1 TS1M2 | |
| 64-bit Enabled AIX | 9.1 TS1M2 | |
| 64-bit Enabled HP-UX | 9.1 TS1M2 | |
| 64-bit Enabled Solaris | 9.1 TS1M2 | |
| HP-UX IPF | 9.1 TS1M2 | |
| Linux | 9.1 TS1M2 | |
| OpenVMS Alpha | 9.1 TS1M2 | |
| Tru64 UNIX | 9.1 TS1M2 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.