Strange STR() function problem

Post Reply
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Strange STR() function problem

Post by Harvey »

Hi all,

I feel like I'm going batty, but there seems to be an error with the STR function in TM1 9.4. Essentially, the STR function only returns a correct result if the value is 0.95 or greater. Otherwise, it returns empty strings.

I've attached an image displaying the problem. StrValue is calculated by the following rule:

FEEDSTRINGS;
SKIPCHECK;
['StrValue'] = S:
STR(['Value'], 15, 2);
FEEDERS;
['Value'] => ['StrValue'];

I also tested 9.1 SP3 with the same result. Has anyone else noticed this behaviour, or am I going crazy?

Cheers,
Harvey.

PS: I want to do this because I need to look up the Cumulative Normal Distribution in a table. This table has a dimension with the lookup values as element names ('0.01', '0.02', etc), so I need the string equivalent of the current value to reference the lookup table.
Attachments
Screenshot of the error
Screenshot of the error
TM1Err.png (9.81 KiB) Viewed 5120 times
Take your TM1 experience to the next level - TM1Innovators.net
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Strange STR() function problem

Post by paulsimon »

Lazarus,

I tried this in 9.1.3 and it works fine.

['String']=S: STR(DB('Test',!Any,'Number'),15,2) ;

I think that your problem is the old chestnut that you cannot use [] notation on the right hand side of a String Rule. You must use DB() even if you are referring to the same cube.

Regards

Paul Simon
Post Reply