Member Properties and Calculated Members & Sets -
08-12-2003
, 03:48 AM
This is a somebody-satisfy-my-curiosity type of question: I have tried
2 ways to do something, 1 works, 1 doesn't, if anyone can understand
why I'd love to know.
I'm using Analysis Services 2000 SP3, testing queries with the MDX
Sample App.
I'm filtering a parent-child dimension that has a member property
named "Account Code" that contains either a numeric or an alphanumeric
value (or a null). I want to select only members with a numeric value
for this member property.
Filtering the dimension within a named set works just fine:
WITH
SET [AccountCode] AS
'{ Filter( [Management Account].Members, IsNumeric( CStr( [Management
Account].CurrentMember.Properties("Account Code") ) ) ) }'
SELECT { [Period].&[2003] } ON COLUMNS ,
[AccountCode]
DIMENSION PROPERTIES [Management Account].[Account Code]
ON ROWS
FROM [Management Reporting]
WHERE ( [Cost Centre].&[30228], [Entity].[Management].&[18001],
[Measures].[GBP at AR] )
However.....using the same functions but creating a calculated member
and then filtering on that doesn't work - all members, including those
with alphanumeric Account Codes, are returned:
WITH
MEMBER [Management Account].[AccountCode] AS
'CStr( [Management Account].CurrentMember.Properties("Account Code")
)'
SELECT { [Period].&[2003] } ON COLUMNS ,
{ Filter( [Management Account].Members, IsNumeric( [Management
Account].[AccountCode] ) ) }
DIMENSION PROPERTIES [Management Account].[Account Code]
ON ROWS
FROM [Management Reporting]
WHERE ( [Cost Centre].&[30228], [Entity].[Management].&[18001],
[Measures].[GBP at AR] )
Can anyone explain to me why these two queries should be any
different?
Thanks in advance
Danny |