change the mdx query to a string & you have to build up the mdx by inserting your dimension names.
e.g. "select measure on axis(0), [dim].[" & param1.value & "] or axis 1 from mycube"
param 1 can come from another mdx query, similar to above which returns all members of the dimension level you need...