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

KB12158: How does the NTileValue Function work in MicroStrategy Developer 10.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This article describes how the NTileValue Function work in MicroStrategy Developer 10.x

For NTile functions, the expected behavior is to have the ranges calculated from 0 to the maximum in the range of values. This is not the case. The NTileValue function actually uses the minimum and maximum of the range of values in the calculation.
Here are the settings for the NTileValue function.
NTileValue: Ascending = True, Segments = 4, BreakBy = {}(Argument)

  • Ascending is a true/false parameter that designates the organization of data within the NTiles.
  • Segments is a positive integer designating the number of buckets in which the values are distributed.
  • BreakBy is the parameter that sets the attribute determining where the calculation restarts.
  • Argument is a metric representing a list of values to be distributed into buckets.

The NTileValue function calculates on ranges, but it segments them by the maximum and minimum range of the values. The range is not calculated from 0 to the Maximum as may be expected. Imagine the data is as follows:
 


Values1098654


Values1098654


Values1098654


Values1098654


Values1098654


Values1098654


Values1098654

If the user sets the NTileValue function as follows, the breakdown of the segments will be calculated as shown below:
 
NTileValue: Ascending = True, Segments = 4, BreakBy{}(Values)
 
The segment ranges are calculated as follows:
 
(Max - Min) / Segment # = Segment Range
(10 - 4)/4 = 1.5
Ranges:
 

  • 4 <= x < 5.5
  • 5.5 <= x < 7
  • 7 £ <= < 8.5
  • 8.5 <= x < 10

The data would be separated as follows:
 

  • Segment 1 = 4,5
  • Segment 2 = 6
  • Segment 3 = 8
  • Segment 4 = 9, 10

To read more about the NTileValue function please refer to the "Analytical Functions Reference."
 


Comment

0 comments

Details

Knowledge Article

Published:

June 6, 2017

Last Updated:

June 6, 2017