No, you cannot mix dimensions on an axis in this manner.
But you could craft the query using tuples, which I think will give you
the results you are after. Note that the dimensionality has to be the
same for every tuple in the set (ie. I specify an Entity first and then
a gender).
WITH
SET [EntityAndGender] AS '{([Entity].[State],Gender.[All Gender]),
([Entity].[State].[District],[Gender].[All Gender]),
(Entity].[All Entity],[Gender].[All Gender].[Male]),
(Entity].[All Entity],[Gender].[All Gender].[Female])}'
Select
{[Measures].[Number of Students]} on axis(0),
NON EMPTY {[EntityAndGender]} on axis(1)
from [SomeCube]
where (Filters Here)
Another possible approach is to create a series of calculated member
WITH
MEMBER Measures.[StateStudents] AS 'Sum([Entity].[State],[Measures].
[Number of Students])'
MEMBER Measures.[DistrictStudents] AS 'SUM([Entity].[State].
[DistrictMeasures].[Number of Students])'
MEMBER Measures.[MaleStudents] AS 'SUM([Gender].[All Gender].
[Male]),Measures].[Number of Students])'
MEMBER Measures.[FemaleStudents] AS 'SUM([Gender].[All Gender].
[Female],Measures].[Number of Students])'
Select
{[Measures].[StateStudents],[Measures].[DistrictStudents][Measures].
[MaleStudents][Measures].[FemaleStudents]} on axis(0),
from [SomeCube]
where (Filters Here)
Note: if you only populate a single axis it has to be axis(0) (columns)
--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell
In article <uSJmrl8sFHA.3864 (AT) TK2MSFTNGP12 (DOT) phx.gbl>,
tchapla (AT) nospam (DOT) turnleaf.com says...
Quote:
I am trying to generate a result set that has multiple members, from two
dimensions on a single axis. Without using a Crossjoin. Can this be
accomplished?
SET [Entities] AS '{[Entity].[State], [Entity].[State].[District]'
SET [Genders] AS '{[Gender].[All Gender].[Male], [Gender].[All
Gender].[Female]}'
Select
{[Measures].[Number of Students]} on axis(0),
NON EMPTY {[Entities], [Genders]} on axis(1)
from [SomeCube]
where (Filters Here)
tx in advance,
tim |