tee_user5


I've tried to do this:

select ({[Date].[Fiscal].[Fiscal Year].&[2004], [Date].[Calendar].[Calendar Year].&[2004]})

on 0 from [Adventure Works]

but it errors with

Members belong to different hierarchies in the function.

Then I tried:

select ({[Date].[Fiscal].[Fiscal Year].&[2004], [Date].[Calendar].[Calendar Year].[All Periods]},

{ [Date].[Fiscal].[Fiscal Year].[All Periods], [Date].[Calendar].[Calendar Year].&[2004]})

on 0 from [Adventure Works]

Two sets specified in the function have different dimensionality.




Re: Querying 1 member from 2 hierarchies in same dimension?

furmangg


select {

([Date].[Fiscal].[Fiscal Year].&[2004], [Date].[Calendar].[Calendar Year].[All Periods]),

([Date].[Fiscal].[Fiscal Year].[All Periods], [Date].[Calendar].[Calendar Year].&[2004])

}

on 0 from [Adventure Works]

Just to reiterate the MDX concepts behind that. An axis (as in, "on 0") is a set. Sets are denoted with curly brackets. A set is made up of tuples. Tuples are denoted with parens:

Select {

(tuple),

(tuple)

}

on 0 from [Adventure Works]







Re: Querying 1 member from 2 hierarchies in same dimension?

furmangg

oops... one more tweak since you were referring to the All member in an invalid way:

select

{

([Date].[Fiscal].[Fiscal Year].&[2004], [Date].[Calendar].[All Periods]),

([Date].[Fiscal].[All Periods], [Date].[Calendar].[Calendar Year].&[2004])

}

on 0 from [Adventure Works]







Re: Querying 1 member from 2 hierarchies in same dimension?

tee_user5

Thanks! I must have been mixing up the two definitions.