There are a few conditions you need to satisfy to get MA so here goes.
1 You can’t be entitled to SMP
2 You need to have been employed for twenty-six weeks in the sixty-six weeks ending in the week before the wee one is due (the Test Period) and the twenty-six weeks don’t need to be one period, they can be ANY twenty-six weeks. It doesn’t matter if you were off work sick in any of the twenty-six weeks, you just need to be employed so it doesn’t matter if you weren’t at work all the time.
3 Your average earnings must be at least £30 each week. The average earnings are the best thirteen weeks’ earnings in the Test Period (again, they needn’t be in a row) added together and then divided by thirteen to get an average. As long as the average is at least £30, that’s okay.
If you satisfy the conditions, the rate of MA will be 90% of the average earnings or £128.73, whichever is lower.