Subset not found in dimension
Posted: Tue Oct 02, 2018 5:12 am
Hi, all
I am testing TI codes in PAW and running into "Subset not found in dimension" issue when executing at VIEWSUBSETASSIGN function.
Could anyone spot it for me? The view and subset have been created via this code successfully. It looks like TI can't bind the subset under the hierarchy into the view.
I am testing TI codes in PAW and running into "Subset not found in dimension" issue when executing at VIEWSUBSETASSIGN function.
Could anyone spot it for me? The view and subset have been created via this code successfully. It looks like TI can't bind the subset under the hierarchy into the view.
Code: Select all
#Section Prolog
#****Begin: Generated Statements***
#****End: Generated Statements****
vsCube = 'Coffee';
vsHier = 'Coffee Color';
vsViewName = 'temp';
vsSubName = vsViewName;
IF( VIEWEXISTS( vsCube, vsViewName ) = 1 );
VIEWDESTROY( vsCube, vsViewName );
ENDIF;
VIEWCREATE( vsCube, vsViewName );
vsDimName = 'Coffee';
IF( HierarchySubsetExists( vsDimName, vsHier, vsSubName ) = 1 );
HierarchySUBSETDESTROY( vsDimName, vsHier, vsSubName );
ENDIF;
HierarchySUBSETCREATE( vsDimName, vsHier, vsSubName);
HierarchySUBSETELEMENTINSERT( vsDimName, vsHier, vsSubName, 'Nescafe', 0 );
VIEWSUBSETASSIGN( vsCube, vsViewName, vsDimName, vsSubName );
DATASOURCETYPE = 'VIEW';
DATASOURCENAMEFORSERVER = vsCube;
DATASOURCENAMEFORCLIENT = vsCube;
DATASOURCECUBEVIEW = vsViewName;
#Section Metadata
#Section Data
ASCIIOutput( 'e:\temp\test.txt', vsCoffee, NumberToString( vnValue ) );
#Section Epilog
#****Begin: Generated Statements***
#****End: Generated Statements****