dbTalk Databases Forums  

Re: MDX Compare property with char

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


Discuss Re: MDX Compare property with char in the microsoft.public.sqlserver.olap forum.



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

Default Re: MDX Compare property with char - 12-20-2005 , 04:45 AM






As far as I know, property is always a string and I dont really see the
difference between those two queries. What would be the datatype of 'Gender'
column and what are the values in it?


MC


"Fernando Marçal" <FernandoMaral (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,

I'm trying to filter out members with the following expression:

FILTER(EXCEPT([Employees].Members,{[Employees].[All
Employees]}),Employees.Properties("Gender") = "F")

The problem is that the comparison between the property and a char
doesn't
work. If the property contains a string, like the following example:

FILTER(EXCEPT([Employees].Members,{[Employees].[All
Employees]}),Employees.Properties("Position Title") = "President")

it works!

Can anybody help?

Thanks.



Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: MDX Compare property with char - 12-20-2005 , 06:36 AM






I agree with MC, the following is from Books OnLine

Quote:
Properties
----------
Returns a string containing a member property value.
Quote:
The properties function inherently returns a string value. I tried the
following query against Foodmart 2000 and it worked fine.

Quote:
SELECT
FILTER(EXCEPT([Employees].Members
,{[Employees].[All Employees]}),Employees.Properties("Gender") =
"F") ON ROWS,
{[Measures].[Org Salary]} ON COLUMNS
FROM [HR]
Quote:
--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <#DKk8DVBGHA.1088 (AT) tk2msftngp13 (DOT) phx.gbl>, marko_culo#@#yahoo#.
#com# says...
Quote:
As far as I know, property is always a string and I dont really see the
difference between those two queries. What would be the datatype of 'Gender'
column and what are the values in it?


MC


"Fernando Marçal" <FernandoMaral (AT) discussions (DOT) microsoft.com> wrote in message
news:AEF61F82-8974-4939-9153-94D364AC0908 (AT) microsoft (DOT) com...
Hello,

I'm trying to filter out members with the following expression:

FILTER(EXCEPT([Employees].Members,{[Employees].[All
Employees]}),Employees.Properties("Gender") = "F")

The problem is that the comparison between the property and a char
doesn't
work. If the property contains a string, like the following example:

FILTER(EXCEPT([Employees].Members,{[Employees].[All
Employees]}),Employees.Properties("Position Title") = "President")

it works!

Can anybody help?

Thanks.





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.