[Mondrian] NULL literal

michael bienstein mbienstein at yahoo.fr
Wed Feb 28 05:07:54 EST 2007

My understanding is as follows:
NULL as a value (not literal) is for Members that do not exist physically but do logically such as [Geography].[All Geography].Parent.  When you pull a cell value for which one member of the context is NULL, you get a NULL value as a numeric (or String etc) for the cell value as opposed to an EMPTY value which is when the membes all exist but there is no value in the cube at that position.

After that there's lots of tricky things you can do with numeric NULL values like addition, multiplication etc E.g. A is a numeric expression that evaluates to NULL and B is a numeric expression that doesn't.  What does A+B evaluate to?

As for the 'IS NULL' construct, that's to test Member expression and numeric expression for having the NULL value given that NULL=NULL yields false.  You can also use NULL explicitly in Range function:
[Time].[1997].FirstChild : NULL

Here's an example of an MDX query that should test a problem (not tested anywhere):

WITH MEMBER [Time].[1997].[Test] AS '[Time].[1997]+0'
{[Time].[1997], [Time].[1997].[Test]} on COLUMNS,
{[Store].[All Stores].Parent} on ROWS
FROM [Warehouse Sales]


PS: I've got code for running multiple tasks going but without test cases.  Found some time.  Taking longer than expected.  Will post by next week but don't want to disturb your efforts to release.


Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070228/a2b4931d/attachment.html 

More information about the Mondrian mailing list