Format
DDStdDev(Input Values)
Returns
Calculates the standard deviation of the input values for each timestamp. Typically this function is used on the return value of a DDGet() or DDGetAttributes() call since these functions can return multiple values for a single timestamp (by fetching the attribute of several entities).
Inputs
Input Values: A collection of values where each value contains the necessary metadata (see Useful to Know below) which indicates the name of the source entity (DDGet() and DDGetAttributes() can produce such return values).
Behaviour: Required
Dimensions: MultiCollection
Valid data types: Decimal, Integer
Useful to Know
In the calculation engine, values returned by DD() functions have metadata assigned to them, such as entity name and start/end times. Other DD() functions can use this metadata to assign additional information to values they receive. In this way, the metadata is used by nested DD() functions to reduce complexity but increase versatility. Which metadata is used and how it is used is specific to each function, and is described in the Input Values section above, where applicable.
Examples
Expression: DDStdDev(DDGetAttributes(DDGetEntities("myHierarchy", 2, "rootEntity"), ":myAttribute"))
Description: This expression produces a similar result to "StdDev({childEntity1:myAttribute}, {childEntity2:myAttribute},... {childEntityN:myAttribute})".
Result: Returns the standard deviation of all fetched values of "myAttribute" for each child entity maximum 2 levels below the "rootEntity" in "myHierarchy".
Expression: DDStdDev({SampleDDGet})
Returns: The standard deviation of all fetched values in the SampleDDGet calculation tag. This tag is actually the same as the DDGet() function in the below example.
Result: 25.4110487862795
Expression: DDStdDev(DDGet("P2 Corporate", 5, "Western Australia", ":Oil Production", "{[Oil Producing Well]:Status} == 0", "Oil Producing Well"))
Returns: The standard deviation of total oil production, for each timestamp, of each Oil Producing Well in Western Australia, in the P2 Corporate hierarchy, where the well is online (status is 0).
Result: 25.4110487862795
Release History
- DDStdDev() 4.6.5
- Changed InputValues parameter dimension from Collection to MultiCollection.
- DDStdDev() 4.5.0
- Initial version