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

KB41450: Can consolidation SQL passes be combined if derived element’s attributes are mapped to the same column in MicroStrategy 9.x-10.x?


Community Admin

• Strategy


SYMPTOM:
 
In Strategy Developer 9.x-10.x, a report contains a consolidation that has multiple derived elements, while the derived elements have different attributes. Even the attributes are mapped to the same column, there are still same passes generated for the each derived element. 
 
Reproducing steps in Tutorial:
 
    1.    Duplicate the attribute ‘Year’ to “Year1”, notice the ID form is mapped to YEAR_ID column of LU_YEAR table as shown blow:
 

ka04W000000OafcQAC_0EM440000002D6A.png

 
     2.    Create a consolidation called CD1 with two elements: {Year=2010} and {Year1=2011} as shown below:
 

ka04W000000OafcQAC_0EM440000002D5z.png

 
     3.    Create a report called R1 with consolidation CD1 in row and metric ‘Revenue’ in column as shown below:
 

ka04W000000OafcQAC_0EM440000002D68.png

 
     4.    Execute the report, notice in the SQL view same passes Pass0 and Pass1 are calculating the consolidation derived elements separately as shown below: 
 
 
Pass0 -  Execution Duration: 0:00:00.04
 Data Fetch Duration from Datasource(s): 0:00:00.00
 Total Data Fetch Duration: 0:00:00.00
 Other Processing Duration: 0:00:00.03
 Rows selected: 1
select a12. AS YEAR_ID,
 sum(a11.) AS Revenue
from  a11,
  a12
where a11. = a12.
 and a12. = 2010
group by a12.
 
Pass1 -  Execution Duration: 0:00:00.00
 Data Fetch Duration from Datasource(s): 0:00:00.00
 Total Data Fetch Duration: 0:00:00.00
 Other Processing Duration: 0:00:00.00
 Rows selected: 0
select a12. AS YEAR_ID,
 sum(a11.) AS Revenue
from  a11,
  a12
where a11. = a12.
 and a12. = 2011
group by a12.
 
 
CAUSE:
 
This is working by design. Following current SQL Optimization logic, only SQL passes with same Group-by attributes may be combined. Although the SQL statements have same group-by columns, in the SQL Engine backend they belong to different attributes, thus SQL Engine perceives them as not combinable.
 
 
WORKAROUND:
 
Use one attribute instead of multiple attributes to define the consolidation elements.
 
 
 
 
 
KB41450


Comment

0 comments

Details

Knowledge Article

Published:

May 26, 2017

Last Updated:

December 31, 2018