math:percent-rank( $arg as xs:anyAtomicType*, $value as xs:anyAtomicType, [$options as xs:string*] ) as xs:double?
Returns the rank of a value in a data set as a percentage of the data set.
If the given value is not equal to any item in the sequence, the function
returns the empty sequence. See math:rank
.
math:percent-rank((1, 7, 5, 5, 10, 9),9) => 0.833333333333333
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.