The way you are doing it now is the correct way of doing it. I'd challenge the request to avoid calculating the quarter in the load script.
The more "heavy duty" calculations can be moved from the expressions ("run-time") into the load script (batch load time), there better for the users.
Your specific problem is that the syntax of AGGR requires a Fileld and not a calculated dimension...
The otherway of calculating the same could be:
count(Merchant_ID) / count(distinct cust_id & '-' & QuarterName(payment_day) )
I believe this calculation should produce the same result, only without using AGGR()