Go Back   CORTEX Forums > Local Happenings > CORTEX Blogs > Random Procrastination
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Random Procrastination Darren Gosbell is a SQL Server expert and Microsoft 'Most Valued Professional' who works as a Principal Consultant at James & Monroe. His blog covers Business Intelligence, SQL Server, .Net, Powershell and MDX Madness

Reply
 
LinkBack Thread Tools Display Modes
Old 23rd June 2009, 07:30 PM   #1 (permalink)
Member
 
Join Date: Jun 2009
Posts: 35
Darren Gosbell is on a distinguished road
Thumbs up SSAS: There is no such thing as an Attribute in MDX!

In MDX in SSAS the term "attribute" occasionally gets used interchangeably with "hierarchy" and "level", but it's not technically accurate.

In SSAS, MDX has concepts of Dimensions, Hierarchies and Levels, but not Attributes. Attributes and Attribute Relationships are design time concepts that are understood by the storage engine, but they are not directly exposed in the MDX language. Attributes actually map to levels (or properties) in MDX. I think the confusion comes about because, by default, an attribute generates a hierarchy with a single level in it that both have the same name as the underlying attribute. (I also think that some of this confusion comes about because of the way that SSAS coalesces different objects, but that is a topic for another time.)

So if you create a Month attribute in the Date dimension, when you process it will generate a Month Hierarchy and a Month Level so in the form .. you end up with [Date].[Month].[Month].

I think that understanding the different types of objects and how they interrelate if fundamental to being able to understand MDX.

In MDX terms:

  • a dimension contains a collection of 1 or more hierarchies,
  • a hierarchy contains a collection of 1 or more levels
  • and a level contains a collection of 1 or more members
...and there is no such thing as an attribute. :)

*

Update [17 Mar 09] - As Mosha has pointed out in the comments, MDX does not have a concept of dimensions either, just hierarchies. There are some references to dimensions, things like the .Dimension function (which actually returns a hierarchy and I think is just a hang over from AS 2000) and member unique names can be expressed in terms of [].[].[].[]. So I think that the dimension concept does "leak" into MDX a little bit.






More...
Darren Gosbell is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSAS: Executing Arbitrary SQL queries Darren Gosbell Random Procrastination 0 23rd June 2009 07:30 PM
SSAS: T-SQL Equivalent for a Many-to-Many relationship Darren Gosbell Random Procrastination 0 23rd June 2009 07:30 PM
SSAS: Powershell to replace a group member in a role Darren Gosbell Random Procrastination 0 23rd June 2009 07:30 PM
Is WolframAlpha The Next Big Thing In Analytics? Steve Bennett Oz Analytics 0 19th May 2009 01:59 AM


All times are GMT +11. The time now is 08:18 AM.

© The Business Intelligence Group

Search Engine Optimization by vBSEO 3.3.0