To demonstrate that Analysis Services treats the multi-hierarchy dimensions separately, use the following FoodMart 2000 database example:
- To generate a new multi-hierarchy dimension, copy the [Time] Shared Dimension to [MHTime].[MH1] and [MHTime].[MH2].
- Edit both of these new dimensions and set the All Level property to Yes.
- Create a new cube named [MHCube] by using sales_fact_dec_1998 as the fact table, which contains [store_sales] as a measure and include the two hierarchies of the [MHTime] dimension, [MH1] and [MH2].
- Change the data source to use the Microsoft Jet 4.0 OLE DB Provider. Otherwise, writebacks cannot be enabled.
- Right-click the [MHCube] cube, and then click Write-Enable to create the default writeback table.
Store Sales for .[Q4]. = 120,160.84
Use the MDX Sample Application to connect to the FoodMart 2000 database, and issue the following MDX:
update cube [MHCube] set ([MHTime].[MH1]..[Q4].) = 1000
However, with Store Sales on columns and [MHTime].[MH2] on rows, the update has been allocated across the complete [MHTime].[MH2] dimension and shows:
Store Sales for .[Q4]. = 1,000
Store Sales for each month = 41.67
For more information about the UPDATE CUBE statement, see the "UPDATE CUBE Statement" topic in SQL Server Books Online.
Artikelnummer: 299926 – Letzte Überarbeitung: 21.11.2006 – Revision: 1