Is there a way to list dimension members without fetching default Measure for each member?
Dimensions, attributes, hierarchies, and levels, are the way we define our business model in MDX. They represent a meta-definition of our data, similar to tables and columns in SQL. Dimensions represent our main business concepts and are a generalization of concrete entities (Geography, Time, or Products).
Testing MDX QueriesOpen SSMS and connect to the Analysis Services server. Right-click on the SSAS database and click New Query -> MDX to open and create a new MDX query. Press Ctrl+V to paste the query text that you captured in the profiler.
In Multidimensional Expressions (MDX), a calculated member is a member that is resolved by calculating an MDX expression to return a value. This innocuous definition covers an incredible amount of ground.
Multidimensional Expressions (MDX) lets you query multidimensional objects, such as cubes, and return multidimensional cellsets that contain the cube's data.
You could SELECT nothing on the opposite axis:
SELECT
{ } on 0,
{ DESCENDANTS([Dimension].[Hierarchy]) } on 1
FROM [Cube]
SELECTing an empty set prevents SSAS from adding the default measure on the opposite axis.
You can access the catalog views which Magnus mentions (which by the way are documented here), from SQL Server 2008 using the following SQL syntax instead of MDX:
SELECT *
FROM $system.MDSCHEMA_MEMBERS
WHERE ...
The SQL understood by Analysis Services is limited: There are no joins possible, and the WHERE
condition may only contain clauses like [HIERARCHY_UNIQUE_NAME] = '[Date].[Order Date]'
connected via AND. GROUP BY and ORDER BY are not supported. But nevertheless, you can query the cube meta data.
Depending on the interface you are using to access Analysis Services there might be some issues, as these metadata are returned in resultset format, not in cellset format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With