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

KB442257: With Data Engine Version=11, In-Memory query instruction is improvised to include the fact table in join tree if there fact table is used in SELECT clause


Community Admin

• Strategy


SYMPTOM
In 11.0 with Data Engine Version = 11 (For more details on enabling the setting, refer to Change Data Engine Version), 
STEPS TO REPRODUCE:
1. This example uses Strategy Tutorial to demonstrate the problem and the fix.
2. Create a Data Import cube with Strategy Tutorial WH tables.
3. Create a subset report and create a aggregate from base derived metric with following expression: 
sum<UseLookupForAttributes=True>([On Order Qty]) {~+, Promotion%} 

ka04W000000ObDvQAK_0EM44000000gLPV.jpeg

4. Create the grid with following attribute, metrics, filters:

ka04W000000ObDvQAK_0EM44000000gLQT.jpeg

Note that Revenue is NULL, which is not correct. The CSI for the above report is the following:


...
Intelligent Cube SQL Statements:

Pass0 - 	Duration: 0:00:00.03
Tables Accessed:
Table10	[L_CATEGORY]:	Category, 		LOOKUP_TABLE	
Table93	[REL_SUBCATEGORY_ITEM]:	Subcategory, Item, 		RELATIONSHIP_TABLE,	ONE_TO_MANY
Table106	[REL_CATEGORY_SUBCATEGORY]:	Category, Subcategory, 		RELATIONSHIP_TABLE,	ONE_TO_MANY
Table118	[F_INVENTORY_CURR_FORTH]:	Item, 	Unit Cost, On Order Qty, Projected Demand Qty, 	FACT_TABLE	
Table129	[F_ORDER_DETAIL]:	Promotion, Employee, Item, Day, Customer, Phone Usage, Order, 	Unit Cost, Unit Price, Gross Revenue, Revenue, Units Sold, Profit, Cost, DiscountFact, Item Count, 	FACT_TABLE	

select	[Category]@[CATEGORY_ID],
	[Category]@[CATEGORY_DESC],
	sum([[F_INVENTORY_CURR_FORTH].On Order Qty])@{[Category]} as [AFB-On Order Qty],
	sum(IF([Promotion]@[PROMOTION_ID] in (1, 2, 0), [[F_ORDER_DETAIL].Revenue], NULLIF(0, 0)))@{[Category]} as [Revenue]
from	SuperApp
with Table Join Tree: 	(Set of distinct Tuple([Customer]@[CUSTOMER_ID], [Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID]) where Tuple([Customer]@[CUSTOMER_ID], [Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID]) in [F_ORDER_DETAIL]<[Item]@[ITEM_ID] between 1 and 600>)
	 Join [REL_SUBCATEGORY_ITEM] with output level Tuple([Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID], [Subcategory]@[SUBCAT_ID])
	 Join [REL_CATEGORY_SUBCATEGORY] with output level Tuple([Category]@[CATEGORY_ID], [Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID])
display having	[Promotion]@[PROMOTION_ID] in (0, 1, 2)

[Analytical engine calculation steps:
	1.  Perform cross-tabbing
]

CAUSE
This is a known issue in Strategy 10.11 and 11.0 with Data Engine Version = 11.
For Strategy 11.0 or above, for more details on enabling the setting, refer to Change Data Engine Version.
For Strategy 10.11 or earlier, for more details on enabling the Feature Flag "Defect fixes that may impact Data, SQL, MDX, CSI" within the Web Preferences -> Project Defaults. For more details on enabling Feature Flags refer to What are the Feature Flag options and what do they accomplish in MicroStrategy Web 10.8 and up. Starting Strategy 11.0, this Feature Flag is removed and replaced with project level setting called "Data Engine Version".
 
ACTION
This issue has been addressed in Strategy 11.1.

ka04W000000ObDvQAK_0EM44000000gLRl.jpeg

Revenue metric values are shown correctly. The CSI for the above report is the following:


...
Intelligent Cube SQL Statements:

Pass0 - 	Duration: 0:00:00.01
Tables Accessed:
Table10	[L_CATEGORY]:	Category, 		LOOKUP_TABLE	
Table92	[REL_SUBCATEGORY_ITEM]:	Subcategory, Item, 		RELATIONSHIP_TABLE,	ONE_TO_MANY
Table104	[REL_CATEGORY_SUBCATEGORY]:	Category, Subcategory, 		RELATIONSHIP_TABLE,	ONE_TO_MANY
Table116	[F_INVENTORY_CURR_FORTH]:	Item, 	Unit Cost, On Order Qty, Projected Demand Qty, 	FACT_TABLE	
Table127	[F_ORDER_DETAIL]:	Promotion, Employee, Item, Day, Customer, Phone Usage, Order, 	Unit Cost, Unit Price, Gross Revenue, Revenue, Units Sold, Profit, Cost, DiscountFact, Item Count, 	FACT_TABLE	


select	[Category]@[CATEGORY_ID],
	[Category]@[CATEGORY_DESC],
	sum([[F_INVENTORY_CURR_FORTH].On Order Qty])@{[Category]} as [AFB-On Order Qty],
	sum(IF([Promotion]@[PROMOTION_ID] in (1, 2, 0), [[F_ORDER_DETAIL].Revenue], NULLIF(0, 0)))@{[Category]} as [Revenue]
from	SuperApp
with Table Join Tree: 	[F_ORDER_DETAIL]<[Item]@[ITEM_ID] between 1 and 600>
	 Join [REL_SUBCATEGORY_ITEM] with output level Tuple([Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID], [Subcategory]@[SUBCAT_ID])
	 Join [REL_CATEGORY_SUBCATEGORY] with output level Tuple([Category]@[CATEGORY_ID], [Day]@[DAY_DATE], [Employee]@[EMP_ID], [Item]@[ITEM_ID], [Order]@[ORDER_ID], [Phone Usage]@[CUSTOMER_ID], [Promotion]@[PROMOTION_ID])
display having	[Promotion]@[PROMOTION_ID] in (0, 1, 2)

[Analytical engine calculation steps:
	1.  Perform cross-tabbing
]

The Strategy Internal Reference Number for the issue discussed in this technical note is KB442257 and DE114934.


Comment

0 comments

Details

Knowledge Article

Published:

November 19, 2018

Last Updated:

December 31, 2018