Returns a division number of a tuple in a set. This function only applies to aggregate storage databases.
Syntax
NTile ( member_or_tuple, set, number_of_divisions, numeric_value_expr )
| Parameter | Description |
|---|---|
member_or_tuple | |
set | The set to order. |
number_of_divisions | The number of divisions to use in ordering the set. |
numeric_value_expr | A numeric value or an expression that returns a numeric value. |
Notes
This function is applicable only to aggregate storage databases.
This function orders the set by a numeric value, divides it into n equal divisions, and returns the division number that the given tuple is in.
Example
WITH
MEMBER [Measures].[7tile] AS
'Ntile
([Measures].[Price Paid],
{ [Products].Levels(0).Members },
7,
[Measures].[Price Paid]
)'
SELECT
{ [Measures].[Price Paid], [Measures].[7tile] } on columns,
{ [Products].Levels(0).Members } on rows
FROM ASOSamp.Sample