I'm not sure what you exactly mean by 'at run time'. Is that while the end-users are querying the cube or during the processing of the cube. Anyway, I've been working with (SS)AS for various years, and as far as I know what you want is not possible.
The last moment you can change the aggregation type of a measure is by executing an XMLA alter cube statement just before processing the cube.
Hope this helps you in your understanding of SSAS.