Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX & Calculated dimension members

Status
Not open for further replies.

calisp

Programmer
Mar 29, 2006
1
GB
Hi,

I'm very new to MDX so am hopeful that this is a simple problem.

I have a cube that I query like this...

SELECT NON EMPTY { [Measures].[Fact Count] } ON COLUMNS,
NON EMPTY ( [Dim1].[Dim X].Children, [Dim1].[Dim Y].Children ) ON ROWS
FROM [Cube]
WHERE ( [Dim2].[4] )

...which works great. What I think I want to do is to replace the Dim X and Dim Y values with calculated members like this...

WITH MEMBER [Dim1].[X] AS [Dim1].[Dim X] - [Dim1].[Offset X]
MEMBER [Dim1].[Y] AS [Dim1].[Dim Y] - [Dim1].[Offset Y]

SELECT NON EMPTY { [Measures].[Fact Count] } ON COLUMNS,
NON EMPTY ( [Dim1].[X].Children, [Dim1].[Y].Children ) ON ROWS
FROM [Cube]
WHERE ( [Dim2].[4] )

...but this does not work.

Have I just got the syntax wrong or am I trying to acheive the results in the wrong way?

Thanks,

Cal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top