SQL Server MDX查询参数

SQL Server MDX查询参数,sql,sql-server-2008,ssas,mdx,business-intelligence,Sql,Sql Server 2008,Ssas,Mdx,Business Intelligence,我对MDX查询非常陌生。我试图通过查询传递一个参数。它给了我以下SQL错误: 查询准备失败。 函数要求5参数使用一个元组表达式。 使用了元组集表达式 查询是: SELECT { [Measures].[DENOMINATOR] ,[Measures].[NUMERATOR] ,[Measures].[Goal] } ON COLUMNS, NON EMPTY ( [Dim Indicator].[Indicator Set].[Indicator Set].ALLMEMBERS ,[Dim

我对MDX查询非常陌生。我试图通过查询传递一个参数。它给了我以下SQL错误:

查询准备失败。
函数要求5参数使用一个元组表达式。
使用了元组集表达式

查询是:

SELECT 
{
[Measures].[DENOMINATOR]
,[Measures].[NUMERATOR]
,[Measures].[Goal]
}
ON COLUMNS,
NON EMPTY
(
 [Dim Indicator].[Indicator Set].[Indicator Set].ALLMEMBERS
 ,[Dim Indicator].[Indicator Group].[Indicator Group].ALLMEMBERS
 ,[Dim Indicator].[Indicator Name].[Indicator Name].ALLMEMBERS
)
ON ROWS
FROM [Dummy-Dashboard]

--Parameter Queries goes here 

WHERE 
(
    strtoset(@DimGenderGenderID)
 )

如果需要使用参数测试查询,则需要使用XMLA进行测试。请参见以下xmla示例:

    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
      <Body>
        <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
          <Command>
            <Statement>
              Your code in here
            </Statement>
          </Command>
          <Properties>
            <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">
              <DataSourceInfo>Provider=MSOLAP;Data Source=local;</DataSourceInfo>
              <Catalog>CubeName</Catalog>
              <Format>Tabular</Format>
              <Content>Data</Content>
              <Timeout>0</Timeout>
            </PropertyList>
          </Properties>
          <Parameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-analysis">
            <Parameter>
              <Name>ParameterName</Name>
              <Value xsi:type="xsd:string">ParameterValue</Value>
            </Parameter>
          </Parameters>
        </Execute>
      </Body>
    </Envelope>

你的代码在这里
提供者=MSOLAP;数据源=本地;
立方胺
表格的
资料
0
参数名
参数值