IF statement in Epilog
Posted: Wed Nov 04, 2015 2:19 am
Hi
I'm building a Project dim & creating the subsets in the Epilog tab.
Some subsets filters by the Customer code of the project/s & if the project has an active status. So my code looks like....
If there are no active projects, the TI process errors out saying it can't create the subset (which is correct). I was hoping I could use an IF statement so it controls if the subset is created or not & to allow the TI process to complete successfully...
but it seems that it totally ignores the subsetcreate if I include the IF statement.
I'm wondering if I am doing something wrong or if this isn't possible.
Many thanks
Terri
I'm building a Project dim & creating the subsets in the Epilog tab.
Some subsets filters by the Customer code of the project/s & if the project has an active status. So my code looks like....
Code: Select all
SubsetCreatebyMDX('subsetname','{HIERARCHIZE({TM1SORT({FILTER({FILTER({TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER( {[Project].[Total Projects]}, ALL, RECURSIVE)},0,1)},[Project].[Customer Code] = "customercode")},[Project].[Active Status] = "Active")},ASC)})}' );
Code: Select all
IF(vCustomerCode@='customercode' % vActiveStatus@='True');
SubsetCreatebyMDX('subsetname','{HIERARCHIZE({TM1SORT({FILTER({FILTER({TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER( {[Project].[Total Projects]}, ALL, RECURSIVE)},0,1)},[Project].[Customer Code] = "customercode")},[Project].[Active Status] = "Active")},ASC)})}' );
ENDIF;
I'm wondering if I am doing something wrong or if this isn't possible.
Many thanks
Terri