FIX: The UPDATE CUBE MDX statement writes the remainder value of the writeback formula to a NULL cell

Article translations Article translations
Article ID: 834491 - View products that this article applies to.
Bug#: 14194 (Plato7x)
Microsoft distributes Microsoft SQL Server 2000 hotfixes as one downloadable file. Because the hotfixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2000 hotfix release.
Expand all | Collapse all

On This Page

SYMPTOMS

In SQL Server 2000, when you use a weighted writeback formula in a Multidimensional Expressions (MDX) UPDATE CUBE statement, a small remainder may be left after the new value is allocated by using the specified formula. The remaining value is inserted in the writeback table for the last cell that is evaluated in the writeback set that the UPDATE CUBE statement specifies. If the last cell is NULL, the cell will still be updated with the remainder value. This behavior may cause records to be displayed for dimension members that were previously empty. Sometimes, the remainder value is so low that the client tool will display the value as zero (0).

For example, the following MDX UPDATE CUBE statement sets the 1998, Forecast, and General & Administrative expenses for the state of California to a value of $750,000. The new value is allocated to the individual stores in California based on their contribution to the total Current Year's Actual Gross Sales for California in the previous year.

UPDATE CUBE
[Budget] SET  
( [Category].[All Category].[Forecast],  
[Account].[All Account].[Net Income].[Total Expense].[General & Administration],
[Store].[All Stores].[USA].[CA], 
[Time].[1998],
[Measures].[Amount]  ) = 750000

USE_WEIGHTED_ALLOCATION BY 
iif(
IsEmpty(( ParallelPeriod([Time].[Year], 1, [Time].Currentmember), 
[Category].[All Category].[Current Year's Actuals], [Store].Currentmember, 
[Account].[All Account].[Net Income].[Net Sales].[Gross Sales], [Measures].[Amount])),
-- Sales Value is empty for the previous year so leave the new value as NULL.
NULL, 
-- Otherwise take the Current Years Actual Gross Sales for the current store, 
--divide it by the total for all of California to get the percentage contribution 
--of this store to Gross Sales and allocate that percentage of the new 
--General & Administration value to this store.
( ParallelPeriod([Time].[Year], 1, [Time].Currentmember) ,  
[Category].[All Category].[Current Year's Actuals], [Store].Currentmember, 
[Account].[All Account].[Net Income].[Net Sales].[Gross Sales], [Measures].[Amount] )    /  
([Time].[1997], [Category].[All Category].[Current Year's Actuals], 
[Store].[All Stores].[USA].[CA], [Account].[All Account].[Net Income].[Net Sales].[Gross Sales], [Measures].[Amount] )  )

Because Alameda has no value for the Gross Sales account in the Current Year's Actuals category for 1997, you would expect Alameda to have no General & Administration value assigned. However, if you run this UPDATE CUBE statement and then you run the following SELECT statement, the results show a value of 0.002 for Alameda:
SELECT
[Measures].Members   ON COLUMNS,
{ [Store].[All Stores].[USA].[CA],   Descendants([Store].[All Stores].[USA].[CA], [Store].[Store City])  } 
ON ROWS
FROM [Budget]
WHERE 
( [Category].[All Category].[Forecast], 
[Time].[1998] , 
[Account].[All Account].[Net Income].[Total Expense].[General & Administration] )
The following table displays the expected results:
Collapse this tableExpand this table
Amount
CA750000
Alameda
Beverly Hills215575.4595
Los Angeles257017.7488
San Diego256479.9204
San Francisco20926.8713
The following table displays the actual results:
Collapse this tableExpand this table
Amount
CA750000
Alameda0.002
Beverly Hills215575.4575
Los Angeles257017.7488
San Diego256479.9204
San Francisco20926.8713
After you apply this fix, the remainder value will be applied to one of the cells in the writeback set.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 How to obtain the latest SQL Server 2000 service pack

Hotfix information

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version    Size       File name
   -------------------------------------------------------
   16-Jul-2004  01:51  8.0.960.0    221,760  Msmdcb80.dll
   16-Jul-2004  02:17  8.0.0.960  4,063,808  Msmddo80.dll
   16-Jul-2004  01:45  8.0.960.0  1,036,864  Msmdgd80.dll
   16-Jul-2004  01:39  8.0.960.0    172,608  Msmdpump.dll
   16-Jul-2004  02:27  8.0.0.960  9,642,564  Msmdsgn80.dll
   16-Jul-2004  01:40  8.0.960.0  1,839,684  Msmdsrv.exe
   16-Jul-2004  02:03  8.0.960.0  2,085,456  Msolap80.dll
   16-Jul-2004  01:17  8.0.960.0    446,524  Msmdsgn.rll
   16-Jul-2004  00:58  8.0.960.0    213,068  Msolap80.rll

Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

SQL Server 2000 Analysis Services 64-bit

For additional informationabout a hotfix build that is designed to be applied on a server that is running SQL Server 2000 Analysis Services 64-bit, or to determine if a hotfix is scheduled to be included in SQL Server 2000 Analysis Services 64-bit Service Pack 4, click the following article number to view the article in the Microsoft Knowledge Base:
831653 Availability of Analysis Services 2000 64 bit hotfix build

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.

MORE INFORMATION

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 834491 - Last Review: November 21, 2006 - Revision: 2.3
APPLIES TO
  • Microsoft SQL Server 2000 Analysis Services
Keywords: 
kbhotfixserver kbqfe kbqfe kbsqlserv2000presp4fix kbfix kbbug KB834491

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com