Solved

MDX Query on SQL 2008 SSRS

Posted on 2014-12-18
2
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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