MDX code to filter by level and attribute - HELP
Posted: Sun Jun 22, 2014 11:54 am
Hi. I am new to MDX (been trying to write new MDX code for only a week) and am struggling to find an MDX code which will return the results of a dimension which has an attribute. I have a dimension called Customer, with a subset called All Parent Customers - Sales Reporting. I usually have to filter by level zero and then using an attribute, filter the results using an attribute called New Customer and the conditon is Yes. This should return all new customers within the past 7 days.
I have managed to filter by level 0 which is the level the attribute works on but have been unable to then add into the mdx code the attribute filter. Can anyone help me with this?
The code I have, for filtering by level 0 is:
=TM1RPTROW($B$9,"CXMD_VCH:Customer","",'{AR}01'!$B$24,"Customer Number & Name",0,"{TM1FILTERBYLEVEL( {Descendants([Customer].[All Parent Customers - Sales Reporting] )}, 0)}")
Please bear with me on this as I am totally new to this.
Thanks
I have managed to filter by level 0 which is the level the attribute works on but have been unable to then add into the mdx code the attribute filter. Can anyone help me with this?
The code I have, for filtering by level 0 is:
=TM1RPTROW($B$9,"CXMD_VCH:Customer","",'{AR}01'!$B$24,"Customer Number & Name",0,"{TM1FILTERBYLEVEL( {Descendants([Customer].[All Parent Customers - Sales Reporting] )}, 0)}")
Please bear with me on this as I am totally new to this.
Thanks