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

KB20696: How to create a calculation on metrics from different datasets in a Report Services Document in MicroStrategy with a calculated expression.


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to create a calculation on metrics from different datasets in a Report Services Document in MicroStrategy with a calculated expression.

In a Report Services document, a user may want to create a calculation on the fly that uses simple arithmetic operators in combination with metrics from multiple datasets in a document.
This can be accomplished by using calculated expressions. Calculated expressions are created using text fields and require braces { } around the entire expression. If you are using metric objects from multiple datasets, utilize the following syntax when referencing the metric from a specific dataset:
{:}
The brackets are used for names in the expression that contain spaces or special characters.
In the example below, the revenue from two different datasets ('Test' and 'Category Revenue') is added in a calculated expression using the following expression in a text box:
{Test:Revenue + :Revenue}

  • Design view:
ka02R000000kY3KQAU_0EM440000002EXX.jpeg
  • PDF view:
ka02R000000kY3KQAU_0EM440000002EXU.jpeg
  • Notes
  • The arithmetic operators supported are +, -, *, /.
  • The use of parentheses within an expression is supported in order to control the order of operations.
  • Numerical constants can be used in calculated expressions.
  • If you don't specify from which dataset to pull the metric from, it will default to the primary dataset.
  • Calculated expressions do not require OLAP services

Comment

0 comments

Details

Knowledge Article

Published:

June 12, 2017

Last Updated:

June 12, 2017