We had a situation at work last Friday in which we were talking long (400 lines or so) MDX queries that worked with hard coded values, and then converting many of the hard coded values to parameters. (it was nicely set up by another developer so that you could comment out the hard coded syntax and uncomment out the parameterized ones) . We cut and paste the query into the dataset query, edited it as an expression (fx) and put appropriate quotes around it = "many line query". When we click ‘get fields’, we get a vague error telling us we either have a syntax error or we can’t connect to the cube. So we backed out to a simpler version of the query with all the parameters got it to work and are now adding back in measures one by one – this is fine for now, but for future reference – is there a better way to trap syntax errors in this situation? Also , at run time, after the user has made a selection, is there a way to see the MDX with the parameters already expanded?
0
votes
1 Answers
0
votes
I could be wrong but I don't think the "refresh fields" button works when you're using a dynamic expression. In these instances you should use the non-dynamic version of the query (with the same metadata), click the "refresh fields" button to get the fields listed, and then parameterize the query with a dynamic expression. As long as the expression doesn't change the metadata, you should be good to go.