Home > Archive > MS SQL Server OLAP > December 2005 > MDX Compare property with char









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MDX Compare property with char
Fernando Marçal

2005-12-20, 7:23 am

Hello,

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

FILTER(EXCEPT([Employees].Members,{[Employees].[All
Employees]}),Employe
es.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]}),Employe
es.Properties("Position Title") = "President")

it works!

Can anybody help?

Thanks.
MC

2005-12-20, 7:23 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@discus
sions.microsoft.com> wrote in message
news:AEF61F82-8974-4939-9153- 94D364AC0908@microso
ft.com...
> Hello,
>
> I'm trying to filter out members with the following expression:
>
> FILTER(EXCEPT([Employees].Members,{[Employees].[All
> Employees]}),Employe
es.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]}),Employe
es.Properties("Position Title") = "President")
>
> it works!
>
> Can anybody help?
>
> Thanks.



Darren Gosbell

2005-12-20, 7:23 am

I agree with MC, the following is from Books OnLine

Properties
----------
Returns a string containing a member property value.[color=darkred]

The properties function inherently returns a string value. I tried the
following query against Foodmart 2000 and it worked fine.
[color=darkred]
SELECT
FILTER(EXCEPT([Employees].Members
,{[Employees].[All Employees]}),Employe
es.Properties("Gender") =
"F") ON ROWS,
{[Measures].[Org Salary]} ON COLUMNS
FROM & #91;HR][color=darkre
d]

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <#DKk8DVBGHA.1088@tk2msftngp13.phx.gbl>, marko_culo#@#yahoo#.
#com# says...[color=darkred]
> 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@discus
sions.microsoft.com> wrote in message
> news:AEF61F82-8974-4939-9153- 94D364AC0908@microso
ft.com...
>
>
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com