<p>I apologize in advance for the long post.<span style="">&nbsp;
</span></p>

<p>There is an interesting quirk with using Aggregate() combined with ValidMeasure().
&nbsp;If you aggregate a ValidMeasure value over a crossjoined set involving an
unrelated dimension you will get a null value in certain unexpected cases.
&nbsp;For example, consider the following members: </p>

<p>member measures.[valid_units shipped] as &#39;validmeasure( measures.[units
shipped] )&#39; <br>
member gender.g as &#39;Aggregate(crossjoin({gender.gender.members}, <br>
[Warehouse].[State Province].members) ) &#39; <br>
member warehouse.w as &#39;Aggregate(crossjoin({gender.gender.members}, <br>
[Warehouse].[State Province].members) ) &#39; </p>

<p>In the cube [warehouse and sales], the warehouse dimension is applicable
to [units shipped], and gender is inapplicable. &nbsp;The [gender].[g] member
will correctly return the aggregated value of [units shipped].
&nbsp;[warehouse].[w], however will return a null value, even though it should
aggregate the exact same set. &nbsp;It&#39;s interesting that defining the aggregate
member on an inapplicable dimension returns the correct value, but defining it on
an applicable dimension does not. </p>

<p class="MsoNormal">Mondrian behavior is consistent with AS2K and SSAS2005 here,
although it seems incorrect.<span style="">&nbsp; </span>In
SSAS2005, however, there is a property called "IgnoreUnrelatedDimensions" which
is applied to measure groups and causes ValidMeasure() like behavior.<span style="">&nbsp; </span>The nice thing about using IgnoreUnrelatedDimensions
is that you do not need to create a calculation for each base measure using the
ValidMeasure() function—it applies to the base measures themselves.<span style="">&nbsp; </span>Also, setting this property causes the
correct results in all cases.</p>



<p class="MsoNormal">Can anyone understand why Mondrian would return null in the
case of the [warehouse].[w] member above?<span style="">&nbsp;
</span>Any guesses about how Microsoft solved the issue with
IgnoreUnrelatedDimensions?</p>