MicroStrategy ONE
NTileValueSize
NTileValueSize
distributes the values in the metric across buckets based on a user-specified value range, sorted in either ascending or descending order. This is an OLAP function.
Syntax
NTileValueSize <Ascending, BreakBy> (
Argument
,
Size
)
Where:
Ascending
is aTRUE
/FALSE
parameter that designates the organization of data within the NTiles.BreakBy
is the parameter that sets the attribute determining where the calculation restarts.Argument
is a metric representing the list of values to be distributed across buckets.Size
is a real number designating the size of the range of values for each bucket.
Example
Example 1: If you define size as 1000 and your range of values begins at 1200, the first bucket contains values 1200 through 2199, the second bucket contains values 2200 through 3199, and so on until every value is in a bucket. It does not matter how many values are in each bucket; it only matters that their value is within the bucket range.
Example 2: This example shows a report where the customer states were sorted based upon revenue and then placed in buckets based upon the value range to which they belong. The value range is defined as 100,000. Beginning at the lowest metric value, in this case 18,654, the first bucket contains values from 18,654 to 118,653, the next bucket ranges from 118,654 to 218,653, and so on until all values are in buckets. The highest value in the report is 1,839,238, which falls into bucket 19 and is the only value in that range.
The report includes the attribute Customer State and the metrics Total Revenue and NTileValueSize. The syntax for the NTileValueSize metric is as follows:
NTileValueSize ([Total Revenue], 100000)
A portion of the resulting report is displayed as follows.