Solved

MDX Where Equivalent

Posted on 2007-03-27
2
266 Views
Last Modified: 2010-03-19
I have this MDX query:

SELECT NON EMPTY { [Measures].[Reflex Tests] , [Measures].[TOTAL RAN] ,
[Measures].[Incomplete] } ON COLUMNS,  
 {
   ( [Tbl ECONN ASSAY].[Assay Name].[Assay Name].ALLMEMBERS,
   [e Conn Instrument].[Salesman Code].[Salesman Code].[116],
   [e Conn Instrument].[Salesman Name].[Salesman Name].ALLMEMBERS,
   [e Conn Instrument].[CUST NO].[CUST NO].[131326],
   [e Conn Instrument].[Customer Name].[Customer Name].ALLMEMBERS )
}  ON ROWS  
  FROM  [Detail Usage] WHERE {  [ALL TIME].[TIME SID].[20070101] : [ALL TIME].[TIME SID].[20070301]  }

I would like to modify it to exclude some Assay Name values. The in T-SQL I would use the WHERE clause something like this:

WHERE AssayName NOT LIKE '%whatever%'

What is the MDX Equivelant syntax for this? Can I filter out certain assay names from the MDX result set somehow?
0
Comment
Question by:Charles Baldo
2 Comments
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 500 total points
ID: 18814236
Perhaps the Except function will do it for you.

WHERE {  
[ALL TIME].[TIME SID].[20070101] : [ALL TIME].[TIME SID].[20070301],
Except([Dim Assays], [Dim Assays].[AssayNameToExclude])
}

Not sure give it a go
0
 

Author Comment

by:Charles Baldo
ID: 18815257
Thank You not the answer but the right direction
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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