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

KB223413: Analytical Engine returns incorrect value when calculating an expression with TRUNC function in MicroStrategy 9.4.x and 10.x


Community Admin

• Strategy


 In MicroStrategy 9.4.x and 10.x, a metric which uses the TRUNC function shows an incorrect value,

SYMPTOM:
 In Strategy 9.4.x and 10.x, a metric which uses the TRUNC function shows an incorrect value, as shown in the image below:
 

ka04W000000OhYPQA0_0EM440000002C9P.jpeg

The expression of the metric, M_SM_ON is (Trunc(((Trunc([M1]) / Trunc([M2])) * 100)) / 100).
 It should return 4.10.
 
STEPS TO REPRODUCE:

  1. Create a database table and insert the data as follows:


col1: 1, col2: 1886.32, col3: 460.98

 

  1. Create an attribute and two metrics (M1, M2) mapped to the column at Step_1.

 

  1. Create a compound metric (M_SM_ON) with the following expression and enable smart metric.


(Trunc(((Trunc([M1]) / Trunc([M2])) * 100)) / 100)

  

  1. Duplicate the metric from Step_3 and disable smart metric (M_SM_OFF), so that the calculation is made on the database.

 
CAUSE:
This is a known limitation with Strategy 9.4.x and 10.x.
 
ACTION:
Replace the Trunc function with "Round" function.


Comment

0 comments

Details

Knowledge Article

Published:

May 16, 2017

Last Updated:

May 16, 2017