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

KB484909: Fix the problem that constant metric returns NULL when using Data Blending with Data Engine Version 2021


Min Zhao

Quality Engineer, Principal • MicroStrategy


This article explains a scenario that constant metric returns NULL when there are multiple datasets for security filter user.

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
Description
For security filter user, the constant derived metric returns NULL when there are multiple datasets even though the security filter is unrelated with dataset Attributes. The data issue is fixed with Data Engine Version 2021.
Steps to Reproduce
This procedure is using Strategy Tutorial WH that is shipped with Strategy products.

  1. Login Strategy Developer, create User M20061 with security filter defined as: Month in {20061}
  2. Create Intelligent Cube C01 with: Attribute Quarter, Month, Country, Region and Metric Cost, Region, and publish the cube.
ka0PW0000001JfZYAU_0EM4W0000026vpz.png
  1. Login Strategy Web as M20061, go to Add External Data -> Databases -> Select Tables, pick the following tables
ka0PW0000001JfZYAU_0EM4W0000026vq0.png
  1. Click Finish and choose Import as an In-memory Dataset, save as MTDI
ka0PW0000001JfZYAU_0EM4W0000026vq1.png
  1. Create dossier with MTDI and C01 as datasets, create constant derived metric DM in dataset MTDI with expression: Sum(1){~+}
  2. Add into Visualization: Year Id, Category Id, DM. It returns NULL for Metric DM
ka0PW0000001JfZYAU_0EM4W0000026vq2.png
  1. View Query Details, Metric DM is missing from SELECT pass.

************   Individual Step Start   ************
Number of Rows Returned: 8
Time Spent: 0.027 sec(s)
Query Execution Start Time: 3/17/2021 3:41:15 PM
Query Execution End Time: 3/17/2021 3:41:15 PM
Tables Accessed:
Table4            [F_MNTH_CATEGORY_SLSBFD39AEB4144A28B08AC99BC1F7B409D]:          Category Id, Month Id,   Tot Dollar Sales, Tot Cost, Tot Unit Sales, Row Count - MNTH_CATEGORY_SLS,             FACT_TABLE         
Table5            [F_LU_MONTH391C65F845E7124CE03E1FA3F511B32D]: Year Id, Quarter Id, Month Id,             Row Count - LU_MONTH, FACT_TABLE         
select  [Category Id]@[CATEGORY_ID],
            [Year Id]@[YEAR_ID]
from    MTDI01=MNTH_CATEGORY_SLS LU_MONTH (2 tables)
with Table Join Tree:           [F_LU_MONTH391C65F845E7124CE03E1FA3F511B32D]
             Join [F_MNTH_CATEGORY_SLSBFD39AEB4144A28B08AC99BC1F7B409D] with output level Tuple([Year Id]@[YEAR_ID], [Category Id]@[CATEGORY_ID])
************   Individual Step End     ************
Cause
This is a known issue in Strategy.
Solution
This issue has been addressed in Strategy 2021.
To pick up the fix, upgrade to Strategy 2021 or above and enable project level setting "Data Engine Version" to 2021 or above. For more details on enabling the setting, refer to Change Data Engine Version
After the fix, the cross join is eliminated.

ka0PW0000001JfZYAU_0EM4W0000026vq3.png

View Query Details, Metric DM is selected.
************   Individual Step Start   ************
Number of Rows Returned: 8
Time Spent: 0.013 sec(s)
Query Execution Start Time: 3/17/2021 3:52:21 PM
Query Execution End Time: 3/17/2021 3:52:21 PM
Tables Accessed:
Table4            [F_MNTH_CATEGORY_SLSBFD39AEB4144A28B08AC99BC1F7B409D]:          Category Id, Month Id,   Tot Dollar Sales, Tot Cost, Tot Unit Sales, Row Count - MNTH_CATEGORY_SLS,             FACT_TABLE         
Table5            [F_LU_MONTH391C65F845E7124CE03E1FA3F511B32D]: Year Id, Quarter Id, Month Id,             Row Count - LU_MONTH, FACT_TABLE         
select  [Category Id]@[CATEGORY_ID],
            [Year Id]@[YEAR_ID],
            sum(1) as [DM]
from    MTDI01=MNTH_CATEGORY_SLS LU_MONTH (2 tables)
with Table Join Tree:           (Set of distinct Tuple([Month Id]@[MONTH_ID], [Year Id]@[YEAR_ID]) where Tuple([Month Id]@[MONTH_ID], [Year Id]@[YEAR_ID]) in [F_LU_MONTH391C65F845E7124CE03E1FA3F511B32D])
             Join [F_MNTH_CATEGORY_SLSBFD39AEB4144A28B08AC99BC1F7B409D] with output level Tuple([Year Id]@[YEAR_ID], [Category Id]@[CATEGORY_ID])
************   Individual Step End     ************
Strategy internal reference number for this technical note is DE165020.
 


Comment

0 comments

Details

Knowledge Article

Published:

March 4, 2021

Last Updated:

March 21, 2024