I have an SSRS table fed by a parameterized DAX query (utilizing the methods in thesearticles). I have all of my parameters working just fine except for those feeding my closing ORDER BY statement (I am offloading the sorting to the Tabular for several reasons, including a large tested performance gain over sorting in SSRS). I have defined the ORDER BY as follows:
ORDER BY @Order1, @Order2, @Order3, @Order4
I cannot get even the first parameter to work. I can pass arbitrary strings with no impact on the report returned, though if I hard code the ORDER BY in the query, the ordering is respected, so I know this is a problem with the parameter.
Running a Profiler trace on the server when I fire the SSRS report returns the following as the parameter value for @Order1:
<Parameter><Name>Order1</Name><Value xsi:type="xsd:string">Dimuser[UserID-Name]</Value>
This is exactly what I want to replace @Order1, and when I hard code that exact string into my query I get the behavior I want.
I have played with \ escaping the brackets to no avail.
Any insight is greatly appreciated.