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

KB45721: Functions with parameter UseLookupForAttributes are supported when used in the aggregate from base/subtotal of the base metric in MicroStrategy Analytics Enterprise


Community Admin

• Strategy


This article describes how the parameter uselookupforattributes works with metrics

The first section of this article shows how to access the Count Parameters while the second part explains the purpose of the UseLookupForAttributes parameter.
First, create a Metric that uses the Count function as seen in the screenshot below:

ka04W000000Ohk1QAC_0EM440000002CXG.png

The parameters of the Count function may be accessed by right clicking on "Count" and choosing Count parameters at the bottom of the list, as seen below:

ka04W000000Ohk1QAC_0EM440000002CWu.png
ka04W000000Ohk1QAC_0EM440000002CWx.png

 -------------------
Only when the functions are defined on an attribute, is the parameter valid and its default value is true.

  • UseLookupForAttributes =true, the aggregate from base/subtotal from the base metric calculates the attribute against the global lookup table.

The way to calculate function (Attribute) against the global lookup table is in cube join. First, generate a new template including all the attributes in the grid together with function (Attribute) metric. Calculate this new grid without a grid source (treat grid source as NULL), and then the exact same behavior could be obtained as the SQLEngine. The value is not be affected by the dataset which the metric is attached to.

  • UseLookupForAttributes = false, the metric will calculate against the source dataset (extended if necessary) which the metric is attached to. If the Attribute does not exist in the source dataset, cross join source dataset with Attribute and calculate function(Attribute) based on cross join result.

The value is affected by the dataset which the metric is attached to.
 
Details are shown below:
For example, create two reports. R01: Category, Cost and report filter: Category is books. 

ka04W000000Ohk1QAC_0EM440000002CXH.png

R02: Category, Profit, report filter: Category is Music and Movies.

ka04W000000Ohk1QAC_0EM440000002CWy.png

  
Create a document based on these reports.
Create four derived metrics from the base metrics to calculate the quantity of Category and create them on different datasets:
Aggregate from base metric can be defined as

ka04W000000Ohk1QAC_0EM440000002CWv.png

 
 
 
 
M01, M02, M03 and M04 are defined with the following formula:
M01=Count<Distinct=True , UseLookupForAttributes=False >(Category){~+} attached to R01.
M02=Count<Distinct=True , UseLookupForAttributes=False>(Category){~+} attached to R02.
M03= Count<Distinct=True , UseLookupForAttributes=True >(Category){~+} attached to R01.
M04=Count<Distinct=True,  UseLookupForAttributes=True>(Category){~+} attached to R02.
 

ka04W000000Ohk1QAC_0EM440000002CXE.png

Comment

0 comments

Details

Knowledge Article

Published:

April 17, 2017

Last Updated:

April 17, 2017