Calculating a usage estimate

You can calculate a usage estimate using a usage estimate formula. For example, you could write a formula that calculates an estimate by taking an average of the past three months of readings or by duplicating the last reading taken. You specify a usage estimate formula when you add or edit a usage estimate.

Usage Estimate formulas use the LocationHistory object (an instance of the Hansen.AssetManagement class), MeterReading object (an instance of the Hansen.AssetManagement.Water class), ServicePosition object (an instance of the Hansen.Billing class) and WaterMeter object (an instance of the Hansen.AssetManagement.Water class) to set Value to a decimal value. For more information about this object and for sample code, click the Information tab in the Formula Editor.

Example

This formula calculates a usage estimate.

Dim dMonthlyUsage = 0.00
	oLocationHistory.GetMirrorImageWaterMeterUsage (
oServicePosition.Address.AddressKay, oServicePosition.Position,
	oMeterReading.ReadingDateTime, dMonthlyUsage )
dUsage = dMonthlyUsage