Invalid number Error

Post Reply
CoN73mP7
Posts: 37
Joined: Wed May 18, 2011 7:48 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003
Location: Stuttgart, Germany
Contact:

Invalid number Error

Post by CoN73mP7 »

Hi,

I've got an error and I don't know why:

Code: Select all

DIMENSIONELEMENTCOMPONENTADD('DBGL_TIME',vMin,vSec,1.000000);
The problem is, that this is generated code of the TI-Process. I haven't changed a thing there. The error says "invalid number in or before Line XYZ.

I suppose, its the weight of the component which causes the error, but I haven't changed anything there.

Some backgroundinfos: I use an English version of TM1 but my computer is german and the use of point and comma is inverted in germany. I've tried to alter the config file and used a comma instead of a point but it hasn't worked either way.

Anyone had that kind of error before or knows what to do to get rid of it?

Alex
Wim Gielis
MVP
Posts: 3229
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Invalid number Error

Post by Wim Gielis »

Hello, inspect your variables vMin and vSec. At least, both should be of String type.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
CoN73mP7
Posts: 37
Joined: Wed May 18, 2011 7:48 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003
Location: Stuttgart, Germany
Contact:

Re: Invalid number Error

Post by CoN73mP7 »

Of cause they are. There is no other way, because consolidated Elements must be String Elements.
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Invalid number Error

Post by Alan Kirk »

CoN73mP7 wrote:Hi,

I've got an error and I don't know why:

Code: Select all

DIMENSIONELEMENTCOMPONENTADD('DBGL_TIME',vMin,vSec,1.000000);
The problem is, that this is generated code of the TI-Process. I haven't changed a thing there. The error says "invalid number in or before Line XYZ.

I suppose, its the weight of the component which causes the error, but I haven't changed anything there.

Some backgroundinfos: I use an English version of TM1 but my computer is german and the use of point and comma is inverted in germany. I've tried to alter the config file and used a comma instead of a point but it hasn't worked either way.

Anyone had that kind of error before or knows what to do to get rid of it?
Sometimes TI errors don't genuinely reflect the underlying problem. However on the off chance that this IS a problem with the formatting (you may want to do this on a copy of the process):
(a) Copy all of the generated code to the area below the End: Generated Statements line. This will give you a starting point;
(b) Change all of your variable Contents to "Other" to get rid of the accursed generated code;
(c) Change the weighting to just 1, with no decimal.

In doing so you've also taken your first steps in breaking away from the appalling auto-generated code, and into writing your own unshackled by what is, IMHO, an inflexible, unintuitive interface.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Invalid number Error

Post by Alan Kirk »

Alan Kirk wrote: Sometimes TI errors don't genuinely reflect the underlying problem. However on the off chance that this IS a problem with the formatting
Actually I just had another thought, one that I like less as it still leaves you dependent on auto-generated code which is to good coding as 3 daily doses of Maccas is to a healthy diet.

Try putting

Code: Select all

DatasourceASCIIDecimalSeparator='.';
in the Prolog after the generated code and see whether that makes a difference. (I'm assuming that the code you cited was in the Metadata tab, so it should be affected by this.)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply