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

KB32400: How to control the datatype of an object defined with an ApplySimple function in MicroStrategy


Community Admin

• Strategy


This article notes how datatypes are set for metrics with multiple inputs

The datatype used to define columns in temporary tables for objects defined with multiple inputs such as an applysimple statement are determined by the datatype of the first object listed in the object definition in Strategy. This true in any case where an explicit datatype is required.
 
An example of this behavior is as follows:
 
A project contains two facts:

  • Fact_A - integer
  • Fact_B - float

This project contains two metrics:

  • Metric_1 = ApplySimple("sum(#0)/sum(#1)", Fact_A, Fact_B)
  • Metric_2 = ApplySimple("sum(#1)/sum(#0)", Fact_B, Fact_A)

A temporary table created for Metric_1 will have a column with an integer datatype. Conversely, a temporary table created for Metric_2 will have a column with a float datatype. Note that the expression used in the two metrics result in the same calculation. The only difference is the order in which the facts are presented.


Comment

0 comments

Details

Knowledge Article

Published:

May 16, 2017

Last Updated:

May 16, 2017