numbers with 13 digits ?

Post Reply
Fweimar
Posts: 5
Joined: Sun Oct 16, 2011 7:28 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

numbers with 13 digits ?

Post by Fweimar »

After loading data from an ORACLE database with the format decimal(13,2) we end up finding numbers in TM1 that look like 90.000000000001 (we exported the data and find these numbers in the .cma file)
and therefore also consolidated values that look like 0.0000000000001

We apply rules that check if a consolidated value <> 0.
All these rules fail, since 0 <> 0.0000000000001

We do not manually spread , we just load data .
Workaround is to use ROUNDP( number,0).
Anyone that has seen this behaviour before ?

using TM1 10.1.1 64 bit on Windows2008 R2

Regards,

Fabian
Last edited by Alan Kirk on Thu Sep 06, 2012 8:26 pm, edited 1 time in total.
Reason: Moved from the Bugs forunm to the general one. It's not a bug. Another reminder to please read the "How to make a bug post" thread before posting in that forum, in particular the bit which indicates that the issue should have an IBM service requ
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: numbers with 13 digits ?

Post by declanr »

If I have understood your post correctly I don't think you are experiencing a bug.

TM1 stores values as binary floating point values; some 2 decimal place values can't be stored in this format which is when you start seeing the .0000000001s etc
Declan Rodger
Fweimar
Posts: 5
Joined: Sun Oct 16, 2011 7:28 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: numbers with 13 digits ?

Post by Fweimar »

It happens anyway ....

We see these numbers directly imported from ORACLE. Is it possible that ORACLE stores them like this ?

"validation:NUN_LEDGER","IT1:08023120","IT2:FAC1","IT3:XXX","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-1954.01
"validation:NUN_LEDGER","IT1:08023120","IT2:PRC1","IT3:XXX","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-179.59
"validation:NUN_LEDGER","IT1:08025120","IT2:CPT1","IT3:MEM","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-46.789999999999999
"validation:NUN_LEDGER","IT1:08025120","IT2:PRC1","IT3:XXX","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-1294.8
"validation:NUN_LEDGER","IT1:08027120","IT2:FAC1","IT3:XXX","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-328.91000000000003
"validation:NUN_LEDGER","IT1:08027120","IT2:MCO1","IT3:XXX","IT4:","IT6:","AC","RAW","1284","PER:201206","Credit (LCY)",-267.05000000000001
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: numbers with 13 digits ?

Post by declanr »

If you want to know how oracle is storing the numbers surely your best option is to query directly without using TM1 as a medium?
Just run a basic sql query to pull the top 1000 rows etc and see what you get.
Declan Rodger
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: numbers with 13 digits ?

Post by Duncan P »

If the columns in the Oracle table are of type BINARY_DOUBLE or BINARY_FLOAT then yes, the numbers in Oracle have the error. If they are defined as NUMBER then no.

However between you and the Oracle database is a lot of code. If any of that code is using IEEE floating point it will introduce the error on numeric data. You could get round it by converting to text in the SQL query and then doing the conversion to number in the TI script.
Fweimar
Posts: 5
Joined: Sun Oct 16, 2011 7:28 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: numbers with 13 digits ?

Post by Fweimar »

The actual inconsistency is between what I see in the TM1 Viewer and what is exported into the .cma file.

How do you explain that ?

Fabian.
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: numbers with 13 digits ?

Post by Duncan P »

Fweimar
Posts: 5
Joined: Sun Oct 16, 2011 7:28 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: numbers with 13 digits ?

Post by Fweimar »

So using the ROUNDP(<32bit float>, 2) is the only way to apply rules that query a cell for the value 0,00 ?

Fabian
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: numbers with 13 digits ?

Post by David Usherwood »

Yes.
TM1 works entirely in full floating point.
Try setting your format to (say) 0,00.0000000000 and see what the cube viewer shows.
I would use a test similar to
if(abs(roundp(['Value'],5) = 0,
...
Post Reply