tags:

views:

38

answers:

1

In TSQL I can do

Select Column1, Column2, '' as Column3, 0 as Column4
From MyTable

I am trying my MDX as:

SELECT
{Measures.Measure1} ON COLUMNS
{
    Dimension1.DimensionColumn1.DimensionColumn1.Members,
    '',
    0
} ON ROWS
FROM  [CubeName]

This does not work - I get the following error message

Executing the query ...
Query (12, 1) Parser: The syntax for '{' is incorrect.

Question: How do I return empty or Zero ON ROWS in MDX?

+1  A: 

You need to define the constant as an expression:

WITH
MEMBER MEASURES.CONSTANTVALUE AS 1
SELECT {MEASURES.CONSTANTVALUE} ON COLUMNS
FROM [cube]
Ed Harper
How do I get this `ON ROWS`?
Raj More
...SELECT {<some other tuple>} ON COLUMNS, {MEASURES.CONSTANTVALUE} ON ROWS...
Ed Harper