Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 apply filter condition in MDX
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 11/06/2012 :  09:01:28  Show Profile  Reply with Quote

i have one MDX query which i am using for reporting, i have around 30 different fields which have different filter condition, below is the example

with member [Measures].[COLPAS] as
'([Measures].[Appointments Count])'
member [Measures].[COLPA] as
'([Measures].[COL VAL 1],[Garage].[Allow Cross Selling].&[True])'
member [Measures].[COLPASC] as
'([Measures].[COL VAL 0],[Garage].[Allow Cross Selling].&[False])'
select {[Measures].[COLPAS],[Measures].[COLPA],[Measures].[COLPASC],.......} on columns,
{([Garage].[Company Id].[Company Id].ALLMEMBERS * [Garage].[Garage Id].[Garage Id].ALLMEMBERS * [Garage].[Company Name].[Company Name].ALLMEMBERS ) } ON rows

so question is if i want to apply filter on full query i can put filter condition at the end of query with WHERE which will consider full query for filter but i want to put filter on member level and sample filter condition are follow in SQLformat.

AND (AL.CreatedOn >= @StartDate AND AL.CreatedOn <= @EndDate)

AND ((@Partner = 0) OR (@Partner = 1 AND A.LeasingCompanyID > 0) OR (@Partner = 2 AND (A.LeasingCompanyID IS NULL OR A.LeasingCompanyID = '-2')))

so how can i achieve this.
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000