Hi Everyone,
One of the sql table fields to be used as dimension has null value in it. I doubt we can create a 'null' element for the dimension. If that's the case, I can't really do cellputs or cellputn to insert the data into an intersection with null element, right? For example, if I do CellPutN(data, Cube, e1, e2, e3, e4) where e2 has a null element, then it won't work, right?
So what can I do about this?
Lee.
Dimension Element with Null Value
-
- MVP
- Posts: 1831
- 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: Dimension Element with Null Value
That depends on the data and what you want to do with it. You can do pretty much anything you want with TI.
If you can live with just not including that data in your TM1 model then you can just check for nulls with an IF statement and do an ItemSkip (or just get rid of the nulls as part of your SQL query.)
If you do still want to see the number adding into your totals then add a dimension element called "Null" or "Dummy" etc. (that would be the word "Null" not the relational database sense of a null) and do an IF statement that checks if your variable is a null and if so declares it as "Null" or "Dummy" etc instead.
If you can live with just not including that data in your TM1 model then you can just check for nulls with an IF statement and do an ItemSkip (or just get rid of the nulls as part of your SQL query.)
If you do still want to see the number adding into your totals then add a dimension element called "Null" or "Dummy" etc. (that would be the word "Null" not the relational database sense of a null) and do an IF statement that checks if your variable is a null and if so declares it as "Null" or "Dummy" etc instead.
Declan Rodger
- wissew
- Posts: 54
- Joined: Tue Jun 17, 2008 7:24 pm
- OLAP Product: TM1
- Version: 9.5.2; 10.2.2; 11
- Excel Version: 2003 SP3 - 2013
- Location: Beaverton, OR
Re: Dimension Element with Null Value
Lee,
Another approach would be to use the nvl funcion in sql to populate the nulls with you default element to eliminate any evaluations in Ti. ie NVL(FieldName, 'Not Available')
Another approach would be to use the nvl funcion in sql to populate the nulls with you default element to eliminate any evaluations in Ti. ie NVL(FieldName, 'Not Available')
-
- Posts: 19
- Joined: Fri Nov 21, 2014 5:01 pm
- OLAP Product: tm1
- Version: 10.1
- Excel Version: 2010
Re: Dimension Element with Null Value
Thank you all for the reply.