AggregateIfTagged()
Returns the aggregated value according to the specified aggregation type of the specified PetroVisor signal, only when the specified tag is active at the current time step.
AggregateIfTagged(Expression, string, string)
Syntax:
Expression: Numeric expression
String: Tag Name
String: Aggregation Type
Arguments:
- Data expression (signal with units)
- Tag Name
- Aggregation type
- Min
- Max
- Sum
- Average
- First
- Last
- Count
- Median
- Standard Deviation
- Variance
- Percentile
- Option - optional, if this argument is not specified, option Always will be used
- Start: returns on aggregated value at the time point of tag range start date
- End: returns on aggregated value at the time point of tag range end date
- Always: returns the same aggregated value for every time point of tag range
- Condition: returns one aggregated value at the time step it is located - not valid for aggregation types: Sum, Average, Median, and Count
Example:
AggregateIfTagged("oil production rate" in "m3/h", "Water coning", "Average")
AggregateIfTagged("oil production rate" in "m3/h", "Sand problem", "Sum", "Start")