Calculate SITE Average Cost Price regardless of the Dimensions selected for the view


I want to know how to calculate site weighted Average cost in the invent on-hand form regardless of the dimensions being displayed.

Please see the following path,

Inventory Management > Inquires and Reports > On-hand list. I have added a new field which will display site weighted average cost price.