Page 1 of 1

How to filter #NA (i.e. UNDEF) values in TI

Posted: Tue Apr 21, 2015 3:21 pm
by vladino
Hi guys,
I'm trying to filter out #NA values in TI process - I don't want them to be copied from one cube to another one.

I have tried this:
IF (NVALUE <> UNDEF)
...

But this is not working. :-/

Could anyone help me with this issue?

BR
Vladino

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Tue Apr 21, 2015 3:37 pm
by tomok
There is no such thing as an #NA value in TM1. What exactly are you talking about?

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Wed Apr 22, 2015 6:07 am
by vladino
I'm talking about division by zero etc. This gives you "NaN" values (which I translate as #NA).

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Wed Apr 22, 2015 8:38 am
by Duncan P
I think you need ISUND.

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Wed Apr 22, 2015 8:50 am
by rmackenzie
vladino wrote:I'm talking about division by zero etc. This gives you "NaN" values (which I translate as #NA).
If you make sure you use \ rather than / in your rules it solves the division by zero problem you're experiencing in that the rule engine will give 0 rather than then cell error. These would then be skipped if you're suppressing zeros in the cube view you're processing.

There's another reason for cell errors when you've got a circular reference in your rules. I think the TI engine throws the error before you get a chance to code for the exception so, once again, fixing the rules is the way forward. If you've deliberately coded circular references then perhaps you want to rethink this as you'll get all sorts of problems with stack overflows and other bothersome issues - did you do that?

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Wed Apr 22, 2015 1:34 pm
by vladino
If you make sure you use \ rather than / in your rules it solves the division by zero problem you're experiencing in that the rule engine will give 0 rather than then cell error.
That's it! Thanks a lot!

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Thu Apr 30, 2015 10:58 pm
by vladino
Hmmm, still not solved... :-/

I have replaced slash with backslash to avoid dividing by zero. But I have discovered that TM1 uses #NA also for infinity, for example dividing by number which is almost zero (3e-323 in my case).

Does anyone know how to deal with this? I need to copy this cell from one cube to another one but I'm not able to avoid minor errors because of #NA (I'm using CellPutN).

Thanks a lot in advance!

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Fri May 01, 2015 12:07 am
by blackhawk
Why is the number so small? Is it real or is it a rounding issue that should have been zero?

Well you could always use:

['Value'] = IF( ABS(['Other Value']) < .001, 0, ['Other Value'] );

FYI: #NA can also occur when you have a circular reference.

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Fri May 01, 2015 7:37 am
by vladino
It's getting more and more weird...

I have traced the calculation up to the source and it should be zero (it is consolidated year value, months are linked to another cube with no data in months -> but months in target cube contain 4,9e-324, therefore yearly consolidated value also has non-zero value).

Why the hell TM1 changed the number and how to fix this?

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Fri May 01, 2015 9:41 am
by qml

Re: How to filter #NA (i.e. UNDEF) values in TI

Posted: Fri May 01, 2015 3:14 pm
by Duncan P
If the exact value you are seeing is 4.94066e-324 then check whether you have (or have ever had) UNDEFVALS in the cube rule. This is the value TM1 uses to represent a null cell when UNDEFVALS is specified.

[EDIT] and BTW another interesting link