Page 1 of 1

MDX expession

Posted: Wed Oct 18, 2017 3:22 pm
by Analytics123
I have the below mdx to select the 3 items in level 3

{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Items].[All Teams].[50].[50 - 5].[50 - 5 - 406],[Items].[All Teams].[50].[50 - 5].[50 - 5 - 407],[Items].[All Teams].[50].[50 - 5].[50 - 5 - 409]}, ALL, RECURSIVE )}, 3)}


now i need modify the mdx to choose 2 items from level 3 and one item from level 4


50-5-406, 50-5-407, 50-5-409-010

In the above mdx i filter by level 3 , since all a re level 3 , now i have level 3 and level 4 how do i change the mdx .

Re: MDX expession

Posted: Wed Oct 18, 2017 3:49 pm
by ascheevel
UNION should work

Re: MDX expession

Posted: Fri Oct 20, 2017 3:30 am
by Wim Gielis
Analytics123 wrote: Wed Oct 18, 2017 3:22 pm I have the below mdx to select the 3 items in level 3

{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Items].[All Teams].[50].[50 - 5].[50 - 5 - 406],[Items].[All Teams].[50].[50 - 5].[50 - 5 - 407],[Items].[All Teams].[50].[50 - 5].[50 - 5 - 409]}, ALL, RECURSIVE )}, 3)}
Why do you include the full path to the elements in the MDX code ? Elements in a dimension are unique, no ?

Re: MDX expession

Posted: Tue Oct 24, 2017 4:51 am
by macsir
{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Items].[All Teams].[50].[50 - 5].[50 - 5 - 406],[Items].[All Teams].[50].[50 - 5].[50 - 5 - 407]}, ALL, RECURSIVE )}, 3)} + {TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Items].[All Teams].[50].[50 - 5].[50 - 5 - 409]}, ALL, RECURSIVE )}, 4)}