TI Dynamic Subset Process to MDX

Post Reply
rfielden
Posts: 122
Joined: Wed Aug 06, 2008 2:50 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007
Location: Tega Cay, SC

TI Dynamic Subset Process to MDX

Post by rfielden »

Again being the novice, can anyone give advice on how to possibly convert the following TI dynamic subset process to its MDX equivalent? We are looking at this option as a possible improvement over our current spreadsheet applications which are using a Process Button with the TI process to mimic zero row suppression on the Web. Thanks.

TI Process:

Prolog
pCC = DimensionElementPrincipalName('CostCenters', pCC);

IF(SubsetExists('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC )=1);
SubsetDestroy('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC );
ENDIF;

SubsetCreate('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC );

Metadata
if( CellGetN('GL',pPLANVERS,'Other',pPLANYR,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pACTVERS2,'Other',pACTYR2,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pACTVERS,'Other',pACTYR,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pPLANVERS,'Other',pFCSTYR,'Unspecified Period','Unspecified Company',pCC,vACC,'Month')
+
CellGetN('OVERHEAD CUBE',pPLANVERS,pFCSTYR,'Total Year','All Lines',pCC,vACC,'Calculated Value')
<> 0);

SubsetElementInsert('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC, vACC ,
SubsetGetSize('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC)+1);

EndIf;

Epilog
if( CellGetN('GL',pPLANVERS,'Other',pPLANYR,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pACTVERS2,'Other',pACTYR2,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pACTVERS,'Other',pACTYR,'Total Year','All Companies',pCC,vACC,'Month') +
CellGetN('GL',pPLANVERS,'Other',pFCSTYR,'Unspecified Period','Unspecified Company',pCC,vACC,'Month')
+
CellGetN('OVERHEAD CUBE',pPLANVERS,pFCSTYR,'Total Year','All Lines',pCC,vACC,'Calculated Value')
<> 0);

SubsetElementInsert('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC, vACC ,
SubsetGetSize('Accounts', pFCSTYR|'_'|pPLANVERS|'_'|pCC)+1);

EndIf;
Post Reply