Return to Snippet

Revision: 64159
at July 10, 2013 16:19 by venu1729


Initial Code
<Alter
       AllowCreate="true"
       ObjectExpansion="ExpandFull"
       xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"
       xmlns:as="http://schemas.microsoft.com/analysisservices/2003/engine">
   <Object>
      <DatabaseID>YourDatabaseName</DatabaseID>
      <CubeID>YourCubeName</CubeID>
      <MdxScriptID>MdxScript</MdxScriptID>
   </Object>
   <ObjectDefinition>
      <MdxScript>
         <ID>MdxScript</ID>
         <Name>MdxScript</Name>
         <Commands
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
            xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
            xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100"
            xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0">
            <Command>
               <Text>
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;

------------------------------------------------
--Paste your MDX Calculations here
------------------------------------------------
-- Eg. Syntax: create member [CurrentCube].[Measures].[MyMedian] as Median(set, measure) ;

               </Text>
            </Command>
         </Commands>
      </MdxScript>
   </ObjectDefinition>
</Alter>

Initial URL
http://www.purplefrogsystems.com/blog/2010/10/deploying-mdx-calculation-scripts-with-xmla/

Initial Description
The below script can be used to deploy calculated members directly onto a cube on a server, without having the solution, or deploying the entire cube.    

Important Note : The script shud have definitions of existing calculated members too. If you don't put them in, they'll get deleted from the cube.

Initial Title
Deploy MDX calculations with XMLA

Initial Tags


Initial Language
XML