Unable to select NULL with IIF in Member clause -
07-29-2005
, 09:53 AM
I need to bring back a calculated field representing a dimension member's
uniquename in my MDX query so I can support drillthrough links in Reporting
Services. So I added "[Partner].currentmember.UniqueName" as a calculated
member and included it in the Measures being selected. The problem is that I
suddenly get a whole bunch of additional data that should not be there by
virtue of the WHERE clause, though the AMT field is empty.
So now I'm trying to something like this:
WITH
MEMBER [Measures].[PartnerUniqueName] AS 'IIF(ISEMPTY([Measures].[Act
Amt]), NULL, [Partner].currentmember.UniqueName)'
SELECT
NON EMPTY {[Measures].[ACT AMT], [Measures].[PartnerUniqueName]} ON
COLUMNS,
NON EMPTY {[Ledger].Children} ON ROWS
FROM Activity
WHERE ([Fund].[Fund2], [Transaction].[Investment])
so that when the ACT AMT field is empty, the UniqueName will also be empty,
but it doesn't compile because of the NULL. Is there another way to skin this
cat? I can filter out the null values in the report, but the performance is
now much slower because the data set is huge.
Thanks,
--Crandaddy |