EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB16412: 'Unexpected level found in result set' error occurs when running a report against Hyperion Essbase


Community Admin

• Strategy


'Unexpected level found in result set' error occurs when running a report against Hyperion Essbase.

SYMPTOM
A report is constructed in Strategy 9.4.x and newer against a Hyperion Essbase cube, such as the following. (The cube in this report is the Sample cube in the ASOSamp catalog provided by Hyperion.)

ka04W00000148ObQAI_0EM440000002FCp.gif

 
When this report is executed, the following error may occur:
 

ka04W00000148ObQAI_0EM440000002FCr.gif

 
Error: SQL Generation Complete
QueryEngine encountered error: Unexpected level found in result set
Error in Process method of Component: QueryEngineServer, Project Strategy Tutorial, Job 221, Error Code= -2147212544.
 
CAUSE
This error occurs when the following conditions are met simultaneously:

  • The template attribute's hierarchy is unbalanced or ragged. That is, the branches of the hierarchical tree either are different lengths, or omit levels in the middle.
  • The report contains only some of the hierarchy's level attributes.
  • The VLDB property 'MDX add generation property' is enabled, as shown below:
ka04W00000148ObQAI_0EM440000002FCh.gif

With this VLDB property enabled, Strategy uses the generation number property of every hierarchy member to place the member in the appropriate level attribute's column. In a balanced hierarchy, every member of a given level will have the same generation number. In ragged or unbalanced hierarchies, generation numbers and level numbers do not have a one-to-one correspondence.
 
In this report, Essbase returns three members (attribute elements) for level 2.

  • Personal Electronics
  • Home Entertainment
  • Computers and Peripherals

'Personal Electronics' and 'Home Entertainment' have generation number 2 in the raw XML results from Essbase, but 'Computers and Peripherals' has generation number 3. The generation numbers are mapped onto attributes as follows. The hierarchy has five levels, with level 4 and generation number 1 at the top, and level 0 and generation number 5 at the bottom.

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

 
LOCALE TYPEPURPOSESETSelection LocaleDetermines who gets what publicationAt the publication levelExecution LocaleDetermines formatting for objects (such as system dates)At the document levelRECIPIENTLOCALESERVICE RECEIVEDAniEnglishPublicationARobertoSpanishPublicationBAndreaPortuguesePublicationCRECIPIENTLOCALESYSTEM DATE FORMATAniEnglish06/30/2006RobertoSpanish30-06-2005AndreaPortuguese2005-30-06 a--b a  b a  b a b a b a^b a!b a_b a#b a--b a$b a!b a%b a?b a&b a(b a(b a)b a)b a@b a*b a*b a/b a/b a?b a\\b a@b a&b a\\b a#b a^b a%b a_b a~`b a~`b a$b ab abGenerationLevel1423324150

Generation number 3 maps onto the template attribute (level 2) neatly, but generation 2 (which is also found in the result set) should be displayed as part of level 3. The level 3 attribute is not on the template, so the Strategy Query Engine has nowhere to put this attribute element. Hence, the level as specified by the generation number is unexpected.
 
In a ragged or unbalanced hierarchy, there is a mismatch between the level numbers and generation numbers as Essbase calculates them. Strategy expects specific generation numbers for the template level attributes, but the result set includes additional, unexpected generation numbers.
 
For more information on level numbers and generation numbers in ragged and unbalanced hierarchies, consult the following Strategy Knowledge Base technical note.
 
KB16411: The MicroStrategy display of ragged and unbalanced hierarchies in Hyperion Essbase cubes does not match the cube definition
ACTION
In most cases, the error may be avoided by including all levels of the hierarchy above the desired level on the template. Because generation 2 should be displayed in level 3, the level 3 attribute should also be on the template, as shown below:
 

ka04W00000148ObQAI_0EM440000002FCn.gif

 
Note that adding a higher level attribute to the template raises the possibility of bringing a lower generation number into the result set, so adding only one level may not be sufficient.
 
In general, the highest-numbered level attribute will have only one element, whose generation number will be 1, so in most cases it should not be necessary to add that element to the template.
 
Note also that the above report does not include all generation 3 elements. In this hierarchy, many of the third-generation elements are actually returned by Essbase in level 1. Consequently, a complete and accurate representation of the hierarchy may be possible only if all the hierarchy level attributes are on the template.
KB16412


Comment

0 comments

Details

Knowledge Article

Published:

May 30, 2017

Last Updated:

December 31, 2018