negative value divided by zero Issue

Post Reply
Analytics123
Posts: 26
Joined: Tue May 23, 2017 12:45 pm
OLAP Product: Tm1
Version: 9.5
Excel Version: 2010

negative value divided by zero Issue

Post by Analytics123 » Tue Jun 20, 2017 12:05 am

Hi,

I have a rule which is

SkipCheck;

[SalesPercentage]= [CurrentSales]\[TotalSales];

Feeders:
[CurrentSales]=>[SalesPercentage]

If I have a negative values for CurrentSales and if total sales is 0 then the cell value calculated is (1,118,559,750,467,500.00)

Anything divided by zero should apply zero right .

Thanks,

User avatar
Alan Kirk
Site Admin
Posts: 5657
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: 9.5.2 64 bit moving to 10.2.2
Excel Version: 2010
Location: Sydney, Australia
Contact:

Re: negative value divided by zero Issue

Post by Alan Kirk » Tue Jun 20, 2017 12:14 am

Analytics123 wrote:Hi,

I have a rule which is

SkipCheck;

[SalesPercentage]= [CurrentSales]\[TotalSales];

Feeders:
[CurrentSales]=>[SalesPercentage]

If I have a negative values for CurrentSales and if total sales is 0 then the cell value calculated is (1,118,559,750,467,500.00)

Anything divided by zero should apply zero right .
No, anything divided by zero is undefined. Anything divided by zero when using the TM1 \ operator is treated as zero, which is not the same thing. But anything which is divided by a really, really small number which is a stack of places to the right of the decimal point and which looks to you like zero because of formatting but actually isn't is going to result in a freakingly huge (absolute) number like the one you are showing here.

You may want to put some rounding functions in your rules to overcome that problem.
"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.

User avatar
qml
MVP
Posts: 1033
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: negative value divided by zero Issue

Post by qml » Tue Jun 20, 2017 10:49 am

There is also a config parameter that can help solve your problem, which is, as Alan pointed out, that the denominator is small, but not zero.
Kamil Arendt

Duncan P
MVP
Posts: 582
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: negative value divided by zero Issue

Post by Duncan P » Sun Jul 16, 2017 8:57 pm

Out of interest what happens when the denominator is the extremely small number used in place of null in some instances when we have UNDEFVALS? I would hope that it would realise and treat it as zero.

It's been a while. Is UNDEFVALS still a thing out there?

Post Reply