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

KB8153: Percentage and Percentile in MicroStrategy Engine


Community Admin

• Strategy


Percentage and Percentile in MicroStrategy Engine

 
In the Strategy Engine, a percentile is not the same as a percent. In a sample of items, to say that one item is in the 50th percentile means that 50 percent of the items in the population are below it. Therefore, if an item is in the 95th percentile, it means that the item is in the top five percent of the items of its population. The percentile refers, thus, to the top part of the percentage in which the item is located.
 
Given the following objects:
 
 
Metrics:
 
PROFIT: Sum(Profit) {~+}
: Rank<ASC=False>(PROFIT)
* : Percentile<Ascending=False>(PROFIT, 0.5) {!+}
 
 
* The percentile function receives two parameters. The first one is an array or list of values and the second one is the desired percentile. The function returns the boundary value for that percentile. In this case, the dimensionality on grouping = none is used because that is the desired level of aggregation for the function. It will receive a list of values; one for each call center and return one value for all the call centers.
 
The following report:
 
, PROFIT, and
 
 
Returns the following:
 


 ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefaultGroup2Full ControlDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ModifyDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefaultObject TypeType Description1Locale2Folder3File4Information Object5Question Object6Information Source7Information Source Module8Information Transmission Module9Document Formatting Module10Subscription Book Module11Distribution Manager12Execution Engine13Cluster14Document15Device16Publication17Subscription Set18Schedule19Service20Narrowcast System/Broadcast System21External22Account23Administrative NotificationGridSQL


 ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefaultGroup2Full ControlDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ModifyDefault ObjectChildrenAdministratorFull ControlDefaultEveryoneCustomDefaultGroup1ViewDefaultObject TypeType Description1Locale2Folder3File4Information Object5Question Object6Information Source7Information Source Module8Information Transmission Module9Document Formatting Module10Subscription Book Module11Distribution Manager12Execution Engine13Cluster14Document15Device16Publication17Subscription Set18Schedule19Service20Narrowcast System/Broadcast System21External22Account23Administrative NotificationGridSQL



select a11.CALL_CTR_ID CALL_CTR_ID,
  sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)) WJXBFS1
from CITY_CTR_SLS a11
group by a11.CALL_CTR_ID

create table #ZZTOG0098SUMD000(
  CALL_CTR_ID TINYINT,
  WJXBFS1 FLOAT,
  WJXBFS2 FLOAT)



insert into #ZZTOG0098SUMD000 values (?, ?, ?)

select pa1.CALL_CTR_ID CALL_CTR_ID,
  pa1.WJXBFS1 WJXBFS1
from #ZZTOG0098SUMD000 pa1

create table #ZZTOG0098SUMD001(
  WJXBFS1 FLOAT)



insert into #ZZTOG0098SUMD001 values (?)

select pa1.CALL_CTR_ID CALL_CTR_ID,
  a11.CENTER_NAME CENTER_NAME,
  pa1.WJXBFS1 WJXBFS1,
  pa1.WJXBFS2 WJXBFS2,
  pa2.WJXBFS1 WJXBFS3
from #ZZTOG0098SUMD000 pa1
  cross join #ZZTOG0098SUMD001 pa2
  join LU_CALL_CTR a11
    on (pa1.CALL_CTR_ID = a11.CALL_CTR_ID)

drop table #ZZTOG0098SUMD000
drop table #ZZTOG0098SUMD001

 
 
 
A report with either one of the following filters:
 
 
Filter 1: > 253659
 
 
OR
 
 
Filter 2: <=
 
 
Returns the top 50th percentile:
 
 


This report returns the top 50th percentile of call centers by profit. In other words, the top 50 percent call centers (~8 out of 15)


This report returns the top 50th percentile of call centers by profit. In other words, the top 50 percent call centers (~8 out of 15)

 
For details on the algorithm used to calculate the percentile function, consult the following Strategy Technical Note.
 

  • KB6369: How Does the Percentile Function Calculate Values in MicroStrategy Engine

 
 
 
 
 
 
 
 
 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 1, 2017

Last Updated:

June 1, 2017