1
votes

i use SSAS And Sql Server 2008 R2.

i writed this query in SSAS

SELECT 
 Measures.[Internet Sales Amount] ON COLUMNS
    , [Measures].[Internet Freight Cost] ON COLUMNS
FROM [Adventure Works]
WHERE 
    ( 
        [Date].[Calendar].[Calendar Quarter]. & [2003] & [2],
        [Product].[Product Line].[Mountain],
        [Customer].[Country].[Australia] 
    )

I was got this error

Executing the query ...

An axis number cannot be repeated in a query.

Execution complete

How i can select two columns in MDX Query?

1

1 Answers

4
votes

You don't need to specify the axis for each measure:

SELECT 
{
    [Measures].[Internet Sales Amount],
    [Measures].[Internet Freight Cost] 
}ON COLUMNS
FROM [Adventure Works]
WHERE 
    ( 
        [Date].[Calendar].[Calendar Quarter]. & [2003] & [2],
        [Product].[Product Line].[Mountain],
        [Customer].[Country].[Australia] 
    )