Rank

Returns the rank of the entity based on the value of specified data expression for each entity. The entity with the lowest value will have rank 1, the entity with the second value will have rank 2 and so on.

Syntax

Rank(expression)
  • expression: name of signal

Example

Rank("oil production rate" in "m3/h")

Returns the descending rank of the entity based on the value of specified data expression for each entity.

With "Ascending" option the entity with the highest value will have rank 1, the entity with the second highest value will have rank 2 and so on.

With "Descending" option the entity with the lowest value will have rank 1, the entity with the second lowest value will have rank 2 and so on.

Syntax

Rank(double numericExpression, string sortOption)

Example

Rank("oil production rate 1" in "m3/h", "Ascending")

Returns the rank of the entity based on the value of specified data expression for each entity. 

With "Ascending" option the entity with the highest value will have rank 1, the entity with the second highest value will have rank 2 and so on.

With "Descending" option the entity with the lowest value will have rank 1, the entity with the second lowest value will have rank 2 and so on.

With "Sport" option the entities with the same values will have the same rank, otherwise entities are additionally sorted alphabetically.

Syntax

Rank(double numericExpression, string sortOption, string rankOption)

Example 

Rank("oil production rate 1" in "m3/h", "Ascending", "Sport")