Calculate Site Weighted average cost of an Item regardless to the dimensions selected in Invent on hand form in Ax2012

Hello Everyone,

I am using Ax2012

I want to add a field that displays the site average cost for a particular item regardless of the dimensions being selected by the user.

Please see the following image for better understanding,

Any suggestions on how to achieve this?