Page 1 of 1

MDX Issue

Posted: Wed Feb 14, 2018 6:01 pm
by Analytics123
Hi ,

I am using the below mdx on an insert subset to test the results .

{Filter({TM1FILTERBYLEVEL({DESCENDANTS([Customers SoldTo Only].[Region - 001]) }, 0)},([AR History].[AR Measures].[Recent Activity],[AR History].[Months].[Feb 2018])=0)}

I want to check the value of Recent activity for all the n level customer under Region 001 for Feb 2018 .

But I am getting an error like

Syntax error at or near '[AR History].[Months].[Feb 2018])=0)}', character position 132 .

Can the filter condition be on 2 dimension values , ([AR History].[AR Measures].[Recent Activity],[AR History].[Months].[Feb 2018])=0)

Should I use something like tuple in cognos .


Any help is appreciated . If that works I will alos need to know count the accounts .

Thanks,

Re: MDX Issue

Posted: Wed Feb 14, 2018 6:15 pm
by Analytics123
Also I tried this with just one dimension on filter condition .


{Count(Filter({TM1FILTERBYLEVEL({DESCENDANTS([Customers SoldTo Only].[Region - 001 - CROSSROADS - CROSS040]) }, 0)},([AR History].[AR Measures].[Recent Activity]])=0))}


But does count makes logical to have here ? Will it give the count of the returned values ?


Thanks,

Re: MDX Issue

Posted: Wed Feb 14, 2018 6:38 pm
by gtonkin
Try something like:

Code: Select all

{Filter(
{TM1FILTERBYLEVEL({DESCENDANTS([Customers SoldTo Only].[Region - 001]) }, 0)},
[AR History].([AR Measures].[Recent Activity],[Months].[Feb 2018])=0
)}
The cube name should be after the tuple/set then the area defined within the brackets. I split the code for readability.

Re: MDX Issue

Posted: Wed Feb 14, 2018 6:44 pm
by tomok
Have you read the MDX Primer? You should keep a shortcut to it and refer often. Check your syntax for filtering on cube values and your mistake will pop out at you.

Re: MDX Issue

Posted: Wed Feb 14, 2018 8:04 pm
by Analytics123
Can I have a Count surrounding the above expression .