문제

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.

도움이 되었습니까?

해결책

OK, I have found:

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

다른 팁

Or try something like this:

SELECT {[Color]} ON ROWS, 
 {[Measures].defaultMember} ON COLUMNS 
FROM [SalesAnalysis]
WHERE {[Color].[black], [Color].[red]}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top