Tecflix

MDX Basic Concepts Get Free Access Purchase the entire course

26 October 2012 · · 41215 views

Unique Names, Tuples & Sets

MDX has the undeserved reputation of being a difficult language. Analysis Services expert Chris Webb makes it easy, introducing the three key MDX concepts: unique names, tuples, and sets, in this 29-minute, free video. Log-in or get a free account to watch it!

All objects in MDX, from cubes to dimensions to hierarchies, levels and members, have unique names. These are the names you should use when writing MDX to uniquely identify an object in a cube. You can determine the unique name of an object by clicking on it, in the metadata pane of an MDX query window in SQL Server Management Studio, and then dragging it into the query pane. Not using a unique name may seem like a good idea, because it makes your MDX code less verbose, but if you do you run the risk of Analysis Services returning a different object with the same name, which will result in errors, or unexpected results.

A tuple is a way of referring to a single value within a cube. If you think of a cube as a gigantic multidimensional array, a tuple is a co-ordinate to one cell within that array. Tuples are written as comma-delimited lists of members, from one or more different hierarchies, and are surrounded by round brackets: (). Tuples are most often used to return values in MDX calculations. You can see two examples of tuples in the demo, starting with a simpler one, and then a more complex one. 

A set is an ordered list of members, or tuples, surrounded by curly brackets: {}. Each item in a set has to be the same type of a thing: for a set of members, each member has to be from the same hierarchy—although the members can be from different levels of the same hierarchy. Chris shows a demo of a set using members of the most commonly used hierarchy: the date hierarchy. For a set of tuples, each tuple has to contain the same number of members, and each tuple has to contain members from the same hierarchy in the same order. Sets are used to define what appears on the rows and columns of an MDX query, and are also used in calculations, for example when aggregating a large number of values.

Make sure to continue learning by watching Chris’s next video MDX Queries.

Log in or register for free to play the video.

  • MDX Basic Concepts 29-min Watch with Free Subscription

  • MDX Queries 24-min Watch with Free Subscription

  • MDX Calculated Members 52-min

  • MDX: Member and Set Functions 38-min

  • What is the MDX Current Member Function? 5-min Free—Watch Now

  • MDX Numeric Functions and CURRENTMEMBER 33-min

  • MDX: Previous Period Growths, Shares & Moving Averages 38-min

  • More MDX Member & Set Functions 1-hour 37-min

  • What is a Subselect in MDX? 3-min Watch with Free Subscription

  • Exists, MDX Solve Order, and Subselects 49-min

  • MDX Performance Diagnosis with Profiler 29-min

Purchase a Full Access Subscription

 
Individual Subscription

$480/year

Access all content on this site for 1 year.
Purchase
Group Purchase

from $480/year

For small business & enterprise.
Group Purchase
 
  • You can also redeem a prepaid code.
  • Payments are instant and you will receive a tax invoice straight away.
  • We offer sales quotes/pro-forma invoices, and we accept purchase orders and bank transfers.
  • Your satisfaction is paramount: we offer a no-quibble refund guarantee.
  • See pricing FAQ for more detail.
In collaboration with
Project Botticelli logo Oxford Computer Training logo SQLBI logo Prodata logo