Using a loop to check an mdx
Posted: Tue Sep 08, 2020 3:08 pm
I wrote an mdx statement
sMDX= '{ DRILLDOWNMEMBER( { DRILLDOWNMEMBER( { DRILLDOWNMEMBER( {TM1FILTERBYLEVEL( {TM1Subsetall()}, 2)}, {[Category_Test].[category director]} ) }, {[Category_Test].[category 2]} ) }, {[Category_Test].[category 3]} ) }';
if(SUBSETEXIST(sDim,sMDX)=1;
subsetdestroy(sDim,sMDX);
endif;
SubsetCreate ( 'Category_Test' , 'sMDX');
Basically I have three drop downs, each being the child of the previous. How would i loop this so that it can create a new dynamic subset for each element i choose(the dynamic subset would contain the children of the chosen element)
sMDX= '{ DRILLDOWNMEMBER( { DRILLDOWNMEMBER( { DRILLDOWNMEMBER( {TM1FILTERBYLEVEL( {TM1Subsetall()}, 2)}, {[Category_Test].[category director]} ) }, {[Category_Test].[category 2]} ) }, {[Category_Test].[category 3]} ) }';
if(SUBSETEXIST(sDim,sMDX)=1;
subsetdestroy(sDim,sMDX);
endif;
SubsetCreate ( 'Category_Test' , 'sMDX');
Basically I have three drop downs, each being the child of the previous. How would i loop this so that it can create a new dynamic subset for each element i choose(the dynamic subset would contain the children of the chosen element)