Just had an issue here where a remote TM1 site was generating data formatted as exponents in their ASCIIOutput routines but just for very small numbers.
i.e. 0.000000003 was being exported as 3e-09
This was causing us data type issues in the relational world we were passing data to. (Yes I know, don't ask)
This issue was caused by TIs different data type conversion.
If you set the your value field to the data type string in the variable tab then you get exponents for small values (the smallest I saw was 1e-05). It did not appear to do this for large numbers.
If you set the data type to numeric and then use numbertostring or str in your asciioutput statement then you get a proper number string i.e. “0.000000003”
Hopefully this will help some else out if they come across this rather annoying wrinkle….
Seen in 9.5.1
Exponents in ASCIIOUTPUT
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Exponents in ASCIIOUTPUT
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Exponents in ASCIIOUTPUT
This is how it has been for as long as I can remember. TM1 puts small numbers in exponential format in the logs too. The only way to change it for an export is to specifically ask for the format you want, like you did with the NumbertoString function. You can't do anything about the logs that I know of, they're still going to be exponential.
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Exponents in ASCIIOUTPUT
Sure, I don't really ever set a number to string in the variables tab so I'd never noticed this difference in behaviour.
NumberToString doesn't have any format type information (unlike Str) so I was trying to point out the different behaviour when you do the type conversion using NumberToString vs doing it in the variables tab.
Cheers,
NumberToString doesn't have any format type information (unlike Str) so I was trying to point out the different behaviour when you do the type conversion using NumberToString vs doing it in the variables tab.
Cheers,
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- MVP
- Posts: 3241
- 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: Exponents in ASCIIOUTPUT
Hi
NumberToStringEx( ) is an alternative too.
NumberToStringEx( ) is an alternative too.
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
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