Finds the rank position of a number in a list of numbers.
- Returned Output: Numeric
- Library: PQL \ Common \ Statistical
- Version: 2018.00.000
- Can be combined with and other PQL function throughout the application.
- It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.
Rank( <Numeric> , <Numeric List> )
* Click on the function's arguments above for more details on the input values.
- The list of numbers can be typed in as a comma delimited list or inserted via an array.
- The rank function finds the position of the supplied target value in the value list, based on a descending sort of the numbers in the list.
Different Function types
- This function is like the Excel RANK function - calculating the rank of a number from a list of items.
- Also see Percentile Rank.
This example finds the rank of the value 4 in the list of values 3 to 6 (returning 3). The dataset function returns a list of numbers.
This example, using the grid above, would find the rank of a number across all the values in column 2 (numbering is zero-based). The DataSetColumn function returns an array (list) of values from column 3 in the grid above.
So it would rank of 22% in a list of all items 23.89%, 23.59% etc will return 9.