I tried this solution and It works. But I don?t want to create a new
cube. That will be my last option. Is not possible to ignore the null
vules with "distinct count" as the aggregate function? Is not there a
propriety that I can configure?
Thanks,
Paulo
Even if you didn't have the NULL challenge with Distinct Count, creating a
separate cube for the Distinct Count is a best practice. There are
aggregation and query performance benefits.
The dimensional granularity to the distinct count cube (with the NOT NULL
filter) would be identical to the other cube, so any queries against the
virtual cube would not require any special calculations.
Erik
----
Erik Veerman
erik (at) solidqualitylearning.com
> I tried this solution and It works. But I don4t want to create a new
> cube. That will be my last option. Is not possible to ignore the null
[quoted text clipped - 6 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
the only other option I can propose is:
add a dimension in the cube, add a column in the fact table called "ToCount"
which contains a Y/N or 0/1 value linked to this new dimension.
case when MyColumn is null then 'N' else 'Y' end as ToCount
hide the dimension.
Rename the dcount measure to HiddenDcount, hide this measure
create a calculated measure which is:
(measures.HiddenDCount, MyDummyDimension.&[Y])
this ignore the null values.
> I tried this solution and It works. But I don´t want to create a new
> cube. That will be my last option. Is not possible to ignore the null
[quoted text clipped - 6 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
Erik Veerman - 16 Dec 2005 19:28 GMT
Here another idea:
Add a hidden measure "NULL_Exists" that's a 0 or 1 based on whether the
distinct count column is NULL or not (Null=1). Use the MAX aggregate type
(the result telling you whether there was a null or not across the
dimensionality you are looking at)
Use a calculated measure that = [DistinctCountMeasure] - [NULL_Exists]
So, if there wasn't a NULL, the NULL_Exists returns a 0 and the distinct
count isn't changed. If there was a NULL, then the result is the distinct
count - 1.
----
Erik Veerman
erik (at) solidqualitylearning.com
> the only other option I can propose is:
> add a dimension in the cube, add a column in the fact table called "ToCount"
[quoted text clipped - 17 lines]
> >
> > *** Sent via Developersdex http://www.developersdex.com ***