How to use grouped aggregation formula and calculate the percentage based on some condition in Analytics Plus?

How to use grouped aggregation formula and calculate the percentage based on some condition in Analytics Plus?

I'm trying to calculate a percentage. 
The numerator should be the sum of sales of the states that have more than 10 customers. That is to say, I have to group the data by State first, then calculate the number of customers in each state and find the states with more than 10 customers.
The denominator should be the sum of sales of all the states, no matter how many customers they have.
How can I calculate this percentage in Analytics Plus and show it in the report or dashboard?