Pergunta

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?

Foi útil?

Solução

Never worked with SAP BW, can you try this other version :

SELECT 
 {Filter([Z_PRODUCT].AllMembers, [Z_PRODUCT].CurrentMember.Name = "" )} DIMENSION PROPERTIES MEMBER_NAME on COLUMNS, 
 {} on ROWS
FROM [BASIS_PS/OPPLEV099]

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 ?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top