Using datasource as parameter for ZeroOut
Posted: Thu Dec 02, 2010 7:46 am
Hello,
I have the code snippet below in Prolog.
I have a text file as datasource with Period_Name, Account, Project, Amount in the Variables tab.
I have tried to use the Period_Name from the Variables tab but it doesnt seem to work.I get a "Dimension Element not found" at SubsetElementInsert(vDimName2, vSubName, CurYr, 1); line.
How can use solve this problem?
CurYr=’20’|SUBST(Period_Name,5,2);
CurMth= SUBST(Period_Name,1,3);
vCube = 'Reporting';
vDimName1 = 'Month';
vDimName2 = 'Year';
vTemp = 'SystemUseOnly_Load' | STR(RAND, 10, 8);
vViewName = vTemp;
vSubName = vTemp;
SubsetCreate(vDimName1, vSubName);
SubsetCreate(vDimName2, vSubName);
SubsetElementInsert(vDimName1, vSubName, CurMth, 1);
SubsetElementInsert(vDimName2, vSubName, CurYr, 1);
ViewCreate(vCube, vViewName);
ViewSubsetAssign(vCube, vViewName, vDimName1, vSubName);
ViewSubsetAssign(vCube, vViewName, vDimName2, vSubName);
ViewZeroOut(vCube, vViewName);
ViewDestroy(vCube, vViewName);
SubsetDestroy(vDimName1, vSubName);
SubsetDestroy(vDimName2, vSubName);
I have the code snippet below in Prolog.
I have a text file as datasource with Period_Name, Account, Project, Amount in the Variables tab.
I have tried to use the Period_Name from the Variables tab but it doesnt seem to work.I get a "Dimension Element not found" at SubsetElementInsert(vDimName2, vSubName, CurYr, 1); line.
How can use solve this problem?
CurYr=’20’|SUBST(Period_Name,5,2);
CurMth= SUBST(Period_Name,1,3);
vCube = 'Reporting';
vDimName1 = 'Month';
vDimName2 = 'Year';
vTemp = 'SystemUseOnly_Load' | STR(RAND, 10, 8);
vViewName = vTemp;
vSubName = vTemp;
SubsetCreate(vDimName1, vSubName);
SubsetCreate(vDimName2, vSubName);
SubsetElementInsert(vDimName1, vSubName, CurMth, 1);
SubsetElementInsert(vDimName2, vSubName, CurYr, 1);
ViewCreate(vCube, vViewName);
ViewSubsetAssign(vCube, vViewName, vDimName1, vSubName);
ViewSubsetAssign(vCube, vViewName, vDimName2, vSubName);
ViewZeroOut(vCube, vViewName);
ViewDestroy(vCube, vViewName);
SubsetDestroy(vDimName1, vSubName);
SubsetDestroy(vDimName2, vSubName);