- Weatherford Knowledge Base
- P#
- Additional Functions
-
Getting Started
-
Customer Training
-
Customer Success
-
Updates
-
Production Optimization
-
Artificial Lift Optimization
-
Completion Optimization
-
Environmental, Social & Governance
-
Development, Acquisition & Divestitures
-
Enhanced Oil Recovery
-
Admin
-
P#
- Getting Started with P#
- Data Cleansing
- String Functions
- Scenario Functions
- Regression Functions
- Placeholder Functions
- Mathematical Functions
- Logic Functions
- Entities Function
- Moving Window Functions
- Time and Date Functions
- Statistical Functions
- Economic Functions
- Data Handling
- Additional Functions
- Directional Functions
- Machine Learning Functions
- DCA Functions
- Neighborhood Functions
-
Packages
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")