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

KB31063: In MicroStrategy Developer and Web 9.4.1, adding derived elements to a report causes a derived metric to display aggregation nulls “--“


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This article notes a behavior with derived elements in MicroStrategy

SYMPTOM:
 
In Strategy Developer and Web 9.4.1, adding derived elements to a report causes a derived metric to display aggregation nulls “--“  as seen below:

ka02R000000kaIRQAY_0EM440000002EPZ.jpeg

 
STEPS TO REPRODUCE:

  • Create an Intelligent Cube with attribute Region and metrics, Revenue and Revenue Forecast
  • Create a subset report based on the above Intelligent Cube
  • Insert a derived metric DM = Revenue Forecast/Revenue as seen below:
ka02R000000kaIRQAY_0EM440000002EPd.jpeg
  • Execute the report either in Strategy Desktop 9.4.1 or Strategy Web 9.4.1 to see the results as shown below:
ka02R000000kaIRQAY_0EM440000002EPk.jpeg
  • Right click on Attribute Region in the grid view of the report and click on Derived Elements as seen below:
ka02R000000kaIRQAY_0EM440000002EPV.jpeg
  • Create a derived element group called DE with elements "Central" and Mid-Atlantic" as seen below:
ka02R000000kaIRQAY_0EM440000002EPb.jpeg
  • The group created from Step 6 can now be seen in the subset report but with value of null for the derived metric as seen below:
ka02R000000kaIRQAY_0EM440000002EPm.jpeg

CAUSE:
This is working as designed in Strategy 9.4.1. Derived Elements follow the same logic as Dynamic Aggregation. With the default evaluation order, the Derived Metric is calculated before the Derived Element. Since users cannot set the Dynamic Aggregation function for Derived Metrics, the dynamic aggregation function is set to default. In this case, Analytical Engine will look into the metric expression to find out the default aggregation function.
In the example above, the Derived Metric is using the operator division "/", which does not have a default aggregation function, and that is why it returns aggregation null whose null display string is set to "--" by default.  
Note: Only functions that have a default aggregatable function are: Sum, Max, Min, Count(non-distinct), Product.
 
ACTION:
Upgrade to Strategy 10. In Strategy 10 the "evaluation ordering" VLDB property has had a new option added which is set as default. This option calculates derived elements before derived metrics avoiding the aggregation nulls seen. The setting is seen below.
9.x order - Calculate derived elements/consolidations before derived metric/smart compound metric, "total" subtotal as smart and other subtotals as non-smart

ka02R000000kaIRQAY_0EM440000002LXL.jpeg

 
WORKAROUND:
Change the default evaluation order to let Derived Metric be evaluated after the Derived Element. There is no way to change the evaluation order in Strategy Web so the following step must be done in Strategy Developer.
In the design view of the report, go to Data -> Report Data Options -> Evaluation Order. Uncheck the “Use default setting” and change the evaluation order for derived element to 1 and derived metric to 2 as shown below:

ka02R000000kaIRQAY_0EM440000002EPX.jpeg

 
This will generate the expected results as seen below:

ka02R000000kaIRQAY_0EM440000002EPh.jpeg

 
 
The above screenshots were for an Intelligent Cube based report but the same idea applies to a regular report that uses Derived Elements. Regular reports are able to contain Derived Elements in newer versions if the Derived Element is added in Web. However unlike an Intelligent Cube based report the evaluation order only shows the derived metric. This is due to a separate problem, but the workaround still works by merely changing the value of the derived metric to 1 or 2. The interface will look like the below picture.

ka02R000000kaIRQAY_0EM440000002EPY.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

May 11, 2017

Last Updated:

May 11, 2017