Solved

MDX Query on SQL 2008 SSRS

Posted on 2014-12-18
2
122 Views
Last Modified: 2014-12-29
For the MDX query below,

"FROM ( SELECT ( STRTOSET(@DIMDATEYearGroup, CONSTRAINED) ) ON COLUMNS"

Is it similar to the where query in TSQL, what the use of STROSET & CONSTRAINED ? The condition defined doesn't need to be a selection list in the query,  correct ?

Inaddition, what does the ON COLUMN mean ?

SELECT
NON EMPTY { [Measures].[Sales Last Year YTD], [Measures].[Sales YTD],[Measures].[Budget YTD] } ON COLUMNS,
NON EMPTY { ([DIM DATE].[Year Group].[Month].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM ( SELECT ( STRTOSET(@DIMDATEYearGroup, CONSTRAINED) ) ON COLUMNS FROM [MyCube])
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
0
Comment
Question by:AXISHK
2 Comments
 
LVL 15

Accepted Solution

by:
Vikas Garg earned 500 total points
ID: 40521736
HI,

On Column means that those fields will be on columns site if you consider the output as matrix.

Where clause is somewhat different in MDX
in SQL you assign a column or value to the where clause but in MDX

WHERE ({[Order Type].[Order Type].&[1],
        [Order Type].[Order Type].&[5],
        [Order Type].[Order Type].&[6]},
       [Customers].[Customers].&[1012])

Columns itself has assigned values

STRTOSET will prepare a set of member as per the condition

SELECT
{ [Measures].[Customer Count] } ON COLUMNS,
STRTOSET('[Customer].[Customer Geography].[Country].Members') ON ROWS
FROM
[Adventure Works]
Output :-
MDX StrToSet Function

http://mdxquery.com/strtoset-mdx-function/
0
 

Author Closing Comment

by:AXISHK
ID: 40522922
Tks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question