![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Thread-Topic: MDX Update Cube syntax ... thread-index: AcaFuBB4Is9fEiUqRiGI18fdRdf4rg== X-WBNR-Posting-Host: 66.20.27.68 From: =?Utf-8?B?RGFubnk=?= <DannyBoi (AT) newsgroups (DOT) nospam Subject: MDX Update Cube syntax ... Date: Thu, 1 Jun 2006 13:15:02 -0700 Lines: 54 Message-ID: <15D1559E-5B05-474F-BB4C-1AFD8A56637F (AT) microsoft (DOT) com MIME-Version: 1.0 Content-Type: text/plain; charset="Utf-8" Content-Transfer-Encoding: 8bit X-Newsreader: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 Newsgroups: microsoft.public.sqlserver.olap Path: TK2MSFTNGXA01.phx.gbl Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:70164 NNTP-Posting-Host: TK2MSFTNGXA01.phx.gbl 10.40.2.250 X-Tomcat-NG: microsoft.public.sqlserver.olap I am trying to format an MDX UPDATE CUBE statement based on a cell selected in a pivot table defined over this cube. When the selected cell is a not a totaled cell I do not have an Issue. However, when a total cell is selected on the pivot table, I cannot seem to format the MDX as I would expect. There is a time dimension named TIMEPERIOD which contains the standard attributes YEAR QTR MONTH. There is also a hierarchy in this dimension called YEARQTRMON which has the order: YEAR ->QTR>MONTH YEAR QTR MON 2006 Q1 01 2006 Q1 02 2006 Q1 03 2006 Q2 01 2006 Q3 01 2006 Q4 01 I want to distribute 5000 units to all items which make up one aggregate cell on the pivot, so I can make an MDX statement such as UPDATE CUBE [CubeName] SET ([Measures].[Sales],[TimePeriod].[yearqtrmon].[Year].&[2006].&[Q2])= 5000 USE_WEIGHTED_ALLOCATION; The above statement nicely distributes the 5000 units to all rows in year 2006, qtr Q2. However, if a 'totaled' pivot cell totaled along the QTR axis is choosen, along with some explicit filters such as Q1 and Q2 only, rather than Q1,Q2,Q3,Q4) In other words, distribute the 5000 to all rows which form the aggregation for the Q1 and Q2 quarters of year 2006. I niavely thought the MDX would be something like: UPDATE CUBE [CubeName] SET ([Measures].[Sales],[TimePeriod].[yearqtrmon].[Year].&[2006].&[Q1],[TimePeri |
|
USE_WEIGHTED_ALLOCATION; But I get The message 'YearQtrMon' hierarchy appears more than once in the tuple. So I broke out the attributes thinking the hiearchy was an issue.... UPDATE CUBE [CubeName] SET ([Measures].[Sales],[TimePeriod].[Year].&[2006],[TimePeriod].[QTR].&[Q1], TimePeriod.[QTR].&[Q2] )= 5000 USE_WEIGHTED_ALLOCATION; Same issue� So how can I distribute 5000 along a partial QTR axis. (Q1 and Q2, but not Q3,Q4) |
![]() |
| Thread Tools | |
| Display Modes | |
| |