True, but that variable holding the grouping results will not work with anonymous types, so I'll have to create a Submission type.
What exactly do you mean 'doesn't work' ?
Anyway, I agree with David, it's not really solveable generically, other than creating the lambda expression manually.
It's a bit of a pain, because group by in linq is not really group by. This means that you can't really append a groupby and return g in a query and append to THAT a select, because the query then is an IGrouping, which is enumerable, but is treated differently by the linq provider, as it has to that because of how Linq's group by works.
So the only way to 'solve' this is by replacing the group group s by s.Region into g, is by writing it as .GroupBy(...) where you pass in an Expression created from the parameter. Though I fear that gives other problems as the C# compiler likes to cram the select projection into the group by projection in your query.
IMHO it's thus easier to write this query in our own api, which can deal with flexible group by collections easily.