Solved

MDX Query on SQL 2008 SSRS

Posted on 2014-12-18
2
119 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 14

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now