Page 1 of 1

negative value divided by zero Issue

Posted: Tue Jun 20, 2017 12:05 am
by Analytics123
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,

Re: negative value divided by zero Issue

Posted: Tue Jun 20, 2017 12:14 am
by Alan Kirk
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.

Re: negative value divided by zero Issue

Posted: Tue Jun 20, 2017 10:49 am
by qml
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.

Re: negative value divided by zero Issue

Posted: Sun Jul 16, 2017 8:57 pm
by Duncan P
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?