SAP BW 上按成员属性进行 MDX 过滤
我正在尝试按名称或唯一名称过滤轴上的成员,但无法在 SAP BW(通过 XMLA)上运行下面的 MDX。
SELECT
{Filter([Z_PRODUCT].AllMembers, ([Z_PRODUCT].CurrentMember.Properties("MEMBER_NAME") = ""))}
DIMENSION PROPERTIES MEMBER_NAME on COLUMNS,
{} on ROWS FROM [BASIS_PS/OPPLEV099]
我尝试在过滤器中使用 ...CurrentMember.Propreties("MEMBER_UNIQUE_NAME") 或 ...CurrentMember.UniqueName 但它们都不起作用。返回的错误是:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>XMLAnalysisError.0x80000005</faultcode>
<faultstring>The XML for Analysis provider encountered an error</faultstring>
<faultactor>XML for Analysis Provider</faultactor>
<detail>
<Error ErrorCode="2147483653" Description="
Invalid MDX command with <member>.properties( <string> )" Source="XML for Analysis Provider" HelpFile="" />
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我在 MS Analysis Services 上像这样使用它,它总是有效。
有什么想法吗?
I'm trying to filter members on axis by their name or unique name and I cannot get MDX below working on SAP BW (over XMLA).
SELECT
{Filter([Z_PRODUCT].AllMembers, ([Z_PRODUCT].CurrentMember.Properties("MEMBER_NAME") = ""))}
DIMENSION PROPERTIES MEMBER_NAME on COLUMNS,
{} on ROWS FROM [BASIS_PS/OPPLEV099]
I tried to use ...CurrentMember.Propreties("MEMBER_UNIQUE_NAME") or ...CurrentMember.UniqueName in filter but none of them worked. The returned error is:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>XMLAnalysisError.0x80000005</faultcode>
<faultstring>The XML for Analysis provider encountered an error</faultstring>
<faultactor>XML for Analysis Provider</faultactor>
<detail>
<Error ErrorCode="2147483653" Description="
Invalid MDX command with <member>.properties( <string> )" Source="XML for Analysis Provider" HelpFile="" />
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I use it like this on MS Analysis Services and it always works.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从未使用过SAP BW,您可以尝试其他版本吗:
您可以直接使用Name,点后的UniqueName,是“非常”MDX标准。我还删除了一个封闭的 (),因为 MDX Filter 函数需要一个逻辑表达。我不确定 MDX 中什么是(真实的)。
ROWS 的空字符串有点奇怪不是吗?
Never worked with SAP BW, can you try this other version :
You can use directly Name, UniqueName after the dot, is 'very' MDX standard. I removed also an enclosing () as the MDX Filter function is expecting a logical expression. And I'm not sure what is (true) in MDX.
It's a bit strange an empty string for ROWS isn't it ?