question

Raj More avatar image
Raj More asked

Difference between Comma and Asterisk

Can someone please explain to me the difference between the following queries

SELECT
    NON EMPTY {([Measures].[MeasureName])} ON COLUMNS,
    NON EMPTY
    {(
    	[Dimension01].[ColumnName01].AllMembers
    	* [Dimension02].[ColumnName03].AllMembers
    	* [Time Period].[WeekStartDate].AllMembers
    )} 
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM [CubeName]

and now using commas

SELECT
    NON EMPTY {([Measures].[MeasureName])} ON COLUMNS,
    NON EMPTY
    {(
    	[Dimension01].[ColumnName01].AllMembers,
    	[Dimension02].[ColumnName03].AllMembers,
    	[Time Period].[WeekStartDate].AllMembers
    )} 
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM [CubeName]
ssasmdx
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gustavo avatar image Gustavo commented ·
When you run these queries against your environment what where the results on both cases ? Does they return the same resultset ?
0 Likes 0 ·
Raj More avatar image Raj More commented ·
Yes they return the same resultset.
0 Likes 0 ·

1 Answer

·
Jack Corbett avatar image
Jack Corbett answered

I really don't know anything about MDX, but I'm gonna venture a guess that the asterisk is the multiplication operator and the comma defines 3 different columns. Again, just a guess although BOL does state that the asterisk is the multiplication operator.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Raj More avatar image Raj More commented ·
can you post a link to the BOL topic
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.