Home > Archive > MS SQL Data Warehousing > October 2005 > Help with MDX selecting multiple attributes in Where clause









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 Help with MDX selecting multiple attributes in Where clause
Steven

2005-10-20, 8:24 pm

Given the following:



Dimension Name: Issues

Measure: Issue Count

Dimension Attributes: Priority (Values 1,2,3,4)

Severity (Values 1,2,3,4)



How can I format an MDX statement to select Issues Where (Priority = 1 or
Priority = 2) and (Severity = 1 or Severity = 2)?



When I try the following:



select [Measures].[Issue Count] on columns,

([Time].[Date].&[9/18/2005]:[Time].[Date].&[10/17/2005]) on rows

From [Issues DB]

where

{

([Issues].[Priority].&[1]),([Issues].[Priority].&[2]),

([Issues].[Severity].&[1]), [Issues].[Severity].&[2]

}



I get the error referenced below:



"Members belong to different hierarchies in the function."



Any pointers would be greatly appreciated!



~Steven


Word 2003 memory Leakage

2005-10-20, 8:24 pm

I guess you treat Priority and Severity as same level and put them between
{}, which is for a set.

Try this:

(

{[Issues].[Priority].&[1], [Issues].[Priority].&[2]},

{[Issues].[Severity].&[1], [Issues].[Severity].&[2]}

)

In your case, I would say put these two properties in 2 hierarchies. which
may improve the performance.

Guangming

"Steven" wrote:

> Given the following:
>
>
>
> Dimension Name: Issues
>
> Measure: Issue Count
>
> Dimension Attributes: Priority (Values 1,2,3,4)
>
> Severity (Values 1,2,3,4)
>
>
>
> How can I format an MDX statement to select Issues Where (Priority = 1 or
> Priority = 2) and (Severity = 1 or Severity = 2)?
>
>
>
> When I try the following:
>
>
>
> select [Measures].[Issue Count] on columns,
>
> ([Time].[Date].&[9/18/2005]:[Time].[Date].&[10/17/2005]) on rows
>
> From [Issues DB]
>
> where
>
> {
>
> ([Issues].[Priority].&[1]),([Issues].[Priority].&[2]),
>
> ([Issues].[Severity].&[1]), [Issues].[Severity].&[2]
>
> }
>
>
>
> I get the error referenced below:
>
>
>
> "Members belong to different hierarchies in the function."
>
>
>
> Any pointers would be greatly appreciated!
>
>
>
> ~Steven
>
>
>

Sponsored Links





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

Copyright 2009 droptable.com