0

I ran the following DMV query on SSAS.

SELECT
 [HIERARCHY_UNIQUE_NAME],
 [LEVEL_NAME],
 [LEVEL_NUMBER],
 [LEVEL_CARDINALITY],
 [LEVEL_TYPE]
from $system.mdschema_levels 
where [DIMENSION_UNIQUE_NAME] = '[DATE]'
 AND [CUBE_NAME] = 'Adventure Works'
 AND [LEVEL_NAME] <> '(All)'.

I get a lot of unexpected LEVEL_TYPESenter image description here

I wanted to understand what do the LEVEL_TYPE like 4289, 4578, 4385, 4759 signify? Are they computed algorithmically or is they a documentation resource one can refer to?

rshetye
  • 667
  • 1
  • 8
  • 21

1 Answers1

0

These Level_TYPE are determined the "Type" property of the dimension attribute that you set in dimension design window of your SSAS project. In case if you set the Type to regular you get 0 else , if you select from one of the types present you get its identifier. The interesting bit is if the HIERARCHY_UNIQUE_NAME has a attribute hierarchy, it returns the identifier for the attribute hierarchy, if HIERARCHY_UNIQUE_NAME has user hierarchy, then the identifier is returned for the LEVEL_NAME's base attribute. For example in the result below, take a look at the two rows that return 68 in LEVEL_TYPE, the first row is being reported as attribute hierarchy, the second as user hierarchy's level(Notice the Level_Number 3 and the difference between the HIERARCHY_UNIQUE_NAME and LEVEL_NAME)

enter image description here

Edit: Specific type details

4289: type Date, 4578: type QuaterOfYear, 4385: type HalfYearOfYear, 4759: type WeekOfYear

MoazRub
  • 2,881
  • 2
  • 10
  • 20