I'm needing a formula to determine average sales.

I have created a couple of databases out of MAS and back into Crystal. I'm needing to know how to find the average of how many items we have sold. something like this.

if LY01_BeginningQ is Greater or equal 1 then count LY01_Sales then count

if LY02_BeginningQ is Greater or equal 1 then count LY02_Sales then count

if LY03_BeginningQ is Greater or equal 1 then count LY03_Sales then count and so on for 12 months

add all the LY??_Sales that were 1 or more and divide by however many it counted