Dim Attrubute copy problem

Post Reply
ravi
Posts: 138
Joined: Mon Apr 26, 2010 12:39 pm
OLAP Product: cognos
Version: tm1 9.5
Excel Version: 2007

Dim Attrubute copy problem

Post by ravi »

Hi All,

I am facing dimension attribute issue while copying attribute values Year to copy to New Year- only for the Top levels

Example:
FY 2017 attribute is 1000 same value should appear in year in FY 2023 as 1000-but it is blank.

My Prolog code:
vElemLength = LONG(ExistingElem);
vPos = SCAN(NumberToString(vFromYear),ExistingElem);
vPosx = SCAN(NumberToString(vFromYearPrev),ExistingElem);
vPrevYear=vToYear-1;
sFYYTD='FY '| NumberToString(vPrevYear ) |' YTD';
sFiscalYear = ATTRS(Dim, ExistingElem , 'Fiscal Year');

IF(( ELISANC(Dim,sYear,ExistingElem) = 1 % ELISANC(Dim,sYearYTD,ExistingElem) = 1) );

IF( vPosx =1);
InputElem = NumberToString(vPrevYear) | SUBST(ExistingElem,5,vElemLength-4);
ENDIF;
IF( vPos =1);
InputElem = NumberToString(vToYear) | SUBST(ExistingElem,5,vElemLength-4);
ENDIF;
IF(ExistingElem@=sFYYTD);
InputElem = pNewYear| SUBST(ExistingElem,8,vElemLength-7);
ENDIF;
IF(vPos >3);
IF(SUBST(ExistingElem,1,vPos-4) @<> ' ');
InputElem = SUBST(ExistingElem,1,vPos-4) | pNewYear ;
ENDIF;
ENDIF;

I tried to make some changes in
IF(( ELISANC(Dim,sYear,ExistingElem) = 1 % ELISANC(Dim,sYearYTD,ExistingElem) = 1 % (ExistingElem @= sYear) % (ExistingElem @= sYearYTD) ) );

But did NOT work for me- appreciate any suggestion. thank you for your time.
Post Reply