How to indicate the measure when use dimension members as ROWS in mdx query?

StackOverflow https://stackoverflow.com/questions/23627083

  •  21-07-2023
  •  | 
  •  

Question

Here is the query that I am using:

SELECT 
NON EMPTY { [Dim Date].[Week].[Week].Members } ON COLUMNS,
[Dim Source].[Source Name].[Source Name].Members ON ROWS
FROM [Some Cube];

The things is, right now, I have many measures. But as I am using dimension members on COLUMNS, I cannot indicate the measure anymore. So this query results in a default measure.

My question is how can I indicate the measure instead of using the default in mdx query? Or is there any other way that I can do this query (dimension in both row and columns is required for reading result logic in C# in possible) ?

Was it helpful?

Solution

You can do it in two ways:

Either on the SELECT statement, as

{ [Dim Date].[Week].[Week].Members } * { [Measures].[My Measure] } ON COLUMNS,

or on the WHERE slicer by adding

WHERE [Measures].[My Measure]

at the end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top