Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dimension, hierarchy, level and member names

Align
alignjustified
When writing calculation formulas you will need to reference dimensions, dimension hierarchies, hierarchy levels and other existing dimension members. In MDX query language all names are enclosed in square brackets [ ].
To reference dimension you just enclose its name in square brackets, e.g. Customers, Time or Measures.
If dimension has just one hierarchy then you can reference the primary hierarchy in the same way as dimension, e.g. Customers or Measures. When you import Time dimension then it automatically will create main hierarchy (with year, quarter, month and day levels) as well as Weekly hierarchy (with year, week and day levels). Time will reference Time dimension main hierarchy but Time.Weekly will reference Time dimension Weekly hierarchy       Kad rakstīsiet formulas jums būs jāizmanto dimensijas, dimensiju hierarhijas, hierarhiju līmeņi un citi eksistējošu dimensiju rādītāji. MDX vaicājumu valodā visi nosaukumi tiek likti kvadrātiekavās [ ].
       Lai atsauktos un izmantotu dimensiju, vienkārši ievietojat formulā tās nosaukumu kvadrātiekavās, piem. Klienti [Customers],Laiks [Time] vai Rādītāji [ Measures ] . Ja dimensijai ir tikai viena hierarhija, ta jūs varat ievietot galveno hierarhiju tieši tāpat kā dimensiju, piem. Klienti [Customers], vai Rādītāji [ Measures ].
       Kad jūs importējat Laika ( Time ) dimensiju , tad automātiski tiks izveidota arī Galvenā hierarhija ( ar gadu, ceturkšniem, mēnešiem un dienu līmeņiem), kā arī Nedēļas hierarhija ( ar gadu, nedēļu un  dienu līmeņiem). Līdz ar to Laiks (Time ) definēs laika dimensiju, bet Laiks.Nedēļas ( Time.Weekly) definēs laika diemnsiju Nedēļas ( Weekly ) hierarhiju.
When you expand specific dimension and expand All hierarchy level members then you see names of all main hierarchy levels. You can reference particular hierarchy level with dimension or hierarchy name.level name. E.g. Customers.City references City level of main hierarchy of Customers dimension.
In case of Time dimension use Time.Year, Time.Quarter, Time.Month, Time.Day to reference main hierarchy levels and Time.Weekly.Year, Time.Weekly.Week, Time.Weekly.Day to reference weekly hierarchy levels.
Each dimension typically will have default All member which can be used to get totals of measures per this dimension. If Customers dimension has default All member named All Customers then you can reference it with Customers.All Customers. As default All member can be renamed it is safer to use Customers.DefaultMember to get the same result. In case of Time dimension there are two default All members for each hierarchy - Time.DefaultMember and Time.Weekly.DefaultMember.
When you want to reference top level dimension members then you use dimension or hierarchy name.member name. E.g. Customers.USA will reference USA member from top level Country level. To reference detailed level dimension members* you need to specify full "hierarchy path" to this member, e.g. Customers.USA.CA to reference CA member in State Province level under USA parent member. Or Customers.USA.CA.San Francisco to reference city etc.
All measures are in top level of Measures dimension and you can reference them with e.g. Measures.Store Sales, Measures.Store Cost etc.

 

...