Showing posts with label profiler. Show all posts
Showing posts with label profiler. Show all posts

Tuesday, March 20, 2012

Report Builder mdx filter returns too many rows

I captured this mdx statement issued by Report Builder in SQL Profiler to
figure out why it was returning more than one year:
(SELECT
{ ( Extract( filter( { [Accounting Date].[MDY Date].Levels(1).Members * {
[Accounting Date].[Date].[Calendar] } },
( ( [Accounting Date].[MDY Date].CurrentMember.membervalue >= "09/01/2005" )
AND ( [Accounting Date].[MDY Date].CurrentMember.membervalue <= "09/30/2005" ) ) ),
[Accounting Date].[MDY Date] ) , * ) } on 0
FROM
[cube]
I just want September 2005 data, but it is returning September data for all
years in the cube.same filter in select statement rendered in Reporting Services Wizard:
FROM ( SELECT ( STRTOMEMBER(@.FromAccountingDateMDYDate, CONSTRAINED) :
STRTOMEMBER(@.ToAccountingDateMDYDate, CONSTRAINED) ) ON COLUMNS FROM [cube])
This works, just can't save report due to known bug using wizard against
Analysis Services 2005.
"bhorwatt" wrote:
> I captured this mdx statement issued by Report Builder in SQL Profiler to
> figure out why it was returning more than one year:
> (SELECT
> { ( Extract( filter( { [Accounting Date].[MDY Date].Levels(1).Members * {
> [Accounting Date].[Date].[Calendar] } },
> ( ( [Accounting Date].[MDY Date].CurrentMember.membervalue >= "09/01/2005" )
> AND ( [Accounting Date].[MDY Date].CurrentMember.membervalue <=> "09/30/2005" ) ) ),
> [Accounting Date].[MDY Date] ) , * ) } on 0
> FROM
> [cube]
> I just want September 2005 data, but it is returning September data for all
> years in the cube.
>