CREATE CUBE and INSERT INTO
You can explicitly list each region on an axis, or you can use the Children function as follows:
{[Geography].[Eastern], [Geography].[Central], [Geography].[Western]}
or
[Geography].Children
Use the Members function to generate a list of all regions and cities in the [Geography] dimension as follows:
[Geography].Members
Use the Crossjoin function as follows:
Crossjoin({[1997],[1998]}, {Descendants([Region].[Eastern], [Cities])}) |
Create a calculated member called Profit by subtracting Cost from ListPrice. Use the following calculated member on one of the axes in the MDX query:
WITH MEMBER [Measures].[ Profit] AS ([Measures].[ListPrice] - [Measures].[Cost]) |
First create an MDX query that displays [Geography].children on the COLUMNS axis and{Q1:Q4} on the ROWS axis. Additionally, the query should specify Measures.[Cost] in the WHERE clause.
Write a CREATE CUBE statement based on the results of the MDX query.
Write an INSERT INTO statement to populate the local cube.
Include the CREATE CUBE and INSERT INTO statements in a connection string when opening a connection to the database in a custom application.
Use the Item method of the Cellset object to identify an individual cell. Then retrieve the cell values by using the FormattedValue property.
Use MDX CREATE CUBE and INSERT INTO statements to create and populate a local cube for offline analysis.
SELECT Descendants([Store].[WA], [Store Name]) ON COLUMNS, [1997].Children ON ROWS FROM Sal es WHERE (Measures.[Unit Sales]) |
Cellset.Item(0) or Cellset.Item(0, 0)
FilterAxis