dimensionelementprincipalname
Posted: Tue Feb 08, 2011 3:45 am
I have a month dimension that has Jan,Feb,Mar,etc with attributr Mthcount as 1,2,3 etc.
I am trying to write the code to get previous month name.
prevmth=numbertostring(ATTRN('Month',pmonth,'MthCount')-1);
prevmthname=DIMENSIONELEMENTPRINCIPALNAME('Month', prevmth);
The asciioutput for prevmthname is 1 when pmonth=1;
I thought that since the Month dimension elements are Jan,Feb,Mar, the DIMENSIONELEMENTPRINCIPALNAME would give Jan or Feb or Mar ?
How then would I get the output to show elementname Jan,Feb or Mar when I only have the attribute to go by?
I am trying to write the code to get previous month name.
prevmth=numbertostring(ATTRN('Month',pmonth,'MthCount')-1);
prevmthname=DIMENSIONELEMENTPRINCIPALNAME('Month', prevmth);
The asciioutput for prevmthname is 1 when pmonth=1;
I thought that since the Month dimension elements are Jan,Feb,Mar, the DIMENSIONELEMENTPRINCIPALNAME would give Jan or Feb or Mar ?
How then would I get the output to show elementname Jan,Feb or Mar when I only have the attribute to go by?