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!
usage of UNDEFVALS
-
- MVP
- Posts: 1828
- 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: usage of UNDEFVALS
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:
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']);
Declan Rodger
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: usage of UNDEFVALS
If you want to go for it, maybe Duncan's post here is of help...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.
Michel
-
- Posts: 18
- Joined: Fri Feb 01, 2013 9:59 am
- OLAP Product: TM1
- Version: 10.2
- Excel Version: 2010
- Location: Switzerland, Estavannens
Re: usage of UNDEFVALS
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!
I didn't know about this function. That's great. I have TM1 version 10.2 so the function is available!