dbTalk Databases Forums  

Member Properties and Calculated Members & Sets

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Member Properties and Calculated Members & Sets in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danny
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.