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

KB16593: 'Allow Smart Metric' setting does not persist in OLAP Cube compound metrics using ApplySimple in MicroStrategy Desktop


Stefan Zepeda

Salesforce Solutions Architect • Strategy


Article outlines why the 'Allow Smart Metric' setting does not persist in OLAP Cube compound metrics using ApplySimple in MicroStrategy Desktop

SYMPTOM
A user creates a compound metric as part of an OLAP cube in Strategy Desktop 8.1.x. The metric formula uses ApplySimple, as illustrated below.
 

ka02R000000kY8eQAE_0EM440000002F8v.gif

 
Following this, the user switches to the Subtotals/Aggregation tab and enables the "Allow Smart Metric" option.
 

ka02R000000kY8eQAE_0EM440000002F8t.gif

 
After saving the metric into the metadata, the user reopens the metric for editing and finds that the "Allow Smart Metric" box is unchecked, despite the fact that it was checked prior to saving.
 

ka02R000000kY8eQAE_0EM440000002F8y.gif

 
CAUSE
The saving behavior is correct. By definition, an ApplySimple metric cannot ever be a smart metric.
 
In a smart metric, the compound metric calculation is to be done in the Analytical Engine after retrieving the individual component metrics' values separately from the database. This supports subtotals and dynamic aggregation over a metric that is the quotient of two other metrics, where the expected aggregate value is the quotient of the sums of the component metrics. Thus, a smart metric whose formula uses metrics A and B must bring back a separate column, one for metric A and another for metric B, in the result set.
 
ApplySimple indicates that the enclosed formula is to be passed directly to the database for evaluation. The result of the ApplySimple can be only a single column containing the result of the operation. ApplySimple cannot be evaluated in the Analytical Engine.
 
Thus, ApplySimple is mutually incompatible with smart metrics, and a metric with an ApplySimple formula that is saved into the metadata with the smart metric flag would be an incorrect metric definition. It is proper for the Strategy metadata components to detect the situation and correct the definition by disabling the smart metric option for that metric.
 
ACTION
The metric definition should be left as is.
 
Notes

  • This issue applies also to MDX passthrough formulas defined by enclosing the formula in quote marks (without the ApplySimple keyword).
  • If the metric formula includes other operations outside of the ApplySimple function, these operations could be evaluated by the Analytical Engine and the smart metric option would be expected to apply in that case.
  • An issue has been logged with the engineering team, because the metric editor in Strategy Desktop should not allow the user to change the smart metric option if that option is not valid for the metric formula.

 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 10, 2017

Last Updated:

June 10, 2017