Question

I have a Color dimension with many colors, but I want to show a table with just two rows (black and red). I tried this:

SELECT [Color].[black] || [Color].[red] ON ROWS, 
 {[Measures].defaultMember} ON COLUMNS 
from [SalesAnalysis]

The result I was expecting was a table with one column and two rows. One cell for black sales, one cell for red sales. An error comes instead.

What MDX request should I write?

I also tried things called "aggregate" and "filter", but it seems that they are not what I am looking for.

Was it helpful?

Solution

OK, I have found:

SELECT {[Color].[black],[Color].[red]} ON ROWS, 
 {[Measures].defaultMember} ON COLUMNS 
from [SalesAnalysis]

OTHER TIPS

Or try something like this:

SELECT {[Color]} ON ROWS, 
 {[Measures].defaultMember} ON COLUMNS 
FROM [SalesAnalysis]
WHERE {[Color].[black], [Color].[red]}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top