Hi guys,

please help me with MDX. I have the following dimension:

<Dimension name="Ccy Des" foreignKey="COUNTRY">
<Hierarchy hasAll="true" allMemberName="Total" primaryKey="COUNTRY_NAME" primaryKeyTable="TEST_COUNTRY">
<Level table="TEST_COUNTRY" name="Country Name" type="String" column="COUNTRY_NAME"/>
<Level table="TEST_CURR" name="Ccy Des" type="String" column="CCY_DES"/>
</Hierarchy>
</Dimension>

What I wanted is to filter the countries that has 'IN' and currency that has 'INR' as the name. I have tried to use the matches but I made it to work only if I have 1 filter. But if I combine these 2. Im not getting the correct result.


I have tried this and it worked:

select Crossjoin(Filter(Descendants([Ccy Des].[Ccy Des].CurrentMember, [Ccy Des].[Ccy Des], SELF_BEFORE_AFTER),
([Ccy Des].[Ccy Des].CurrentMember.Name MATCHES "(?i).*IN.*")), {[Measures]}) ON ROWS
from [TEST]

but with the 2 filters combined, it doesnt work.
select Crossjoin(Filter(Descendants([Ccy Des].[Ccy Des].CurrentMember, [Ccy Des].[Ccy Des], SELF_BEFORE_AFTER),
(([Ccy Des].[Country Name].CurrentMember.Name MATCHES "(?i).*IN.*") AND ([Ccy Des].[Ccy Des].CurrentMember.Name MATCHES "(?i).*INR.*"))),
{[Measures]}) ON ROWS
from [TEST]

please help me.

thanks in advance,
james