It's based on the average of the last fifty-two PAID weeks of employment. All those paid weeks are added together and divided by fifty-two to give the average.
If you've worked for less than fifty-two week or not had fifty-two payments in the last 104 week, the total amount is divided by the number of weeks you received a payment.