Page 1 of 1

usage of UNDEFVALS

Posted: Wed Jan 15, 2014 10:32 am
by fabpas
Hi all,

I suspect my problem is very generic.
I have a cube which uses UNDEFVALS. It works as expected. Now, I would like to have an additional rule like
['RejectedPrct'] = 1 - ['RejectedQty'] \ ['InspectedQty'];
I can see that it works for cells with valid integers (including 0) but when I get a "null" cell (for either Rejected or InspectedQty), the formula returns 1. I would like the formula to return null when any of the input value is null.
Is there a way to do that?
Thx for your help!

Re: usage of UNDEFVALS

Posted: Wed Jan 15, 2014 10:48 am
by declanr
Not sure if the IsUndefinedCellValue function only came in for 10.2... if so I'm not sure how you would check it in prior versions.


For versions that do include the function you could just put this in your rule:

Code: Select all

['RejectedPrct'] = If (  ( IsUndefinedCellValue ( ['RejectedQty'] ) =1 ) % ( IsUndefinedCellValue ( ['InspectedQty'] ) =1 ), 0,
                                  1 - ['RejectedQty'] \ ['InspectedQty']);

Re: usage of UNDEFVALS

Posted: Wed Jan 15, 2014 10:58 am
by Michel Zijlema
declanr wrote:Not sure if the IsUndefinedCellValue function only came in for 10.2... if so I'm not sure how you would check it in prior versions.
If you want to go for it, maybe Duncan's post here is of help...

Michel

Re: usage of UNDEFVALS

Posted: Wed Jan 15, 2014 12:15 pm
by fabpas
That's exactly what I wanted!
I didn't know about this function. That's great. I have TM1 version 10.2 so the function is available!