Time Context Value Retrieval
We want to know the Specific Electricity Consumption (kWh/mt) over a time period (selected by users).
Specific Electricity Consumption = (Electricity Consumption(kWh)) / (Raw Feed Consumed(mt))
Where, Electricity Consumption (kWh) and Raw Feed Consumed (mt) are both attributes with PIPoint data reference, using value retrieval method: TimeMethod = Time Range; TimeRangeMethod = Total; EventWeighted
Then, Specific Electricity Consumption is attribute with Formula data reference, simply: A=Electricity Consumption; B=Raw Feed Consumed;[A/B]
So, on PI Vision, it can display the specific electricity consumption with the correct values. However, if we query through PI Web API for our own webpage, it is not able to do so.
For the specific electricity consumption attribute, we are only allowed to use GetValue and GetInterpolatedValue, which does not provide us the correct value.