Depends on which client tool is used for filtering. With Excel 2003 or
OWC, you could use Existing, like:
Quote:
|
With Member [Measures].[OrderGain] as
|
LINREGSLOPE(Existing [Date].[Calendar].[Month].Members,
[Measures].[Order Quantity],
Rank([Date].[Calendar], [Date].[Calendar].[Month].Members)),
FORMAT_STRING = '#,#'
select {[Measures].[Order Quantity],
[Measures].[OrderGain]} on 0
from [Adventure Works]
where {[Date].[Calendar].[Month].&[2004]&[2]
:[Date].[Calendar].[Month].&[2004]&[6]}
But this won't work with SQL Server 2005 BI tools browser filter or with
Excel 2007, since these use FROM clause subcube, as discussed in this
recent NG thread:
http://groups.google.com/group/micro...olap/browse_fr
m/thread/299d49ee13f7d577/54f2ecee7e59d848#54f2ecee7e59d848
Quote:
|
Excel 12 MDX and Filtering
|
...
Hi NG,
I tested these days Excel 12 with ASY. I realized that the Pivot Table
uses
sub cubes to filter.
This has some bad side effects with some calculated members that
aggregate
using LASTPERIODS (12) over a time period.
...
Answer: The semantic of FROM subcube is currently under review by both
Excel and Analysis Sevices teams to make sure semiadditive measures,
distinct count, visual totals, etc work well with Excel filtering.
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***