Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server Analysis Services
Azure Analysis Services
Fabric/Power BI Premium
To create and run an MDX Script in SQL Server Analysis Services, you need to be in SQL Server Data Tools with a cube already created and ready for editing.
To create a Multidimensional Expressions (MDX) script
Open the cube for which you want to create an MDX script, and under View, click Calculations.
If you are not in Script View mode, click the Script View icon.
In the script window, under the CALCULATE command, type an MDX expression. Click the Check Syntax icon and verify that the expression is syntactically correct.
To run the MDX script, deploy and process the cube with the new MDX script changes.
See Also
The Basic MDX Script (MDX)
MDX Scripting Fundamentals (Analysis Services)
MDX Scripting Statements (MDX)