Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX help with a scope statement

Status
Not open for further replies.

eo

MIS
Apr 3, 2003
809
0
0
Hi,

I have a cube, and would like to sum measures where two dimension attributes intersect.
The first dimension is Claim and the second is LossDate. The hierarchical structure for each is...

Claim:

Dimension - [Claim]
Hierarchy - [ClaimNo]
Attribute - [ClaimNumber]

LossDate:

Dimension - [DateLoss]
Hierarchy - [DateLoss]
Attribute - [YearNo]

And herewith the section in the MDX code:

Code:
SCOPE([Claim].[ClaimNo].[ClaimNumber],[DateLoss].[DateLoss].[YearNo]);

    [MEASURES].[GrsClaimIncurred] = 
        //Sum(Descendants([Claim].[ClaimNo].CurrentMember)
        Sum(Descendants([Claim].[ClaimNo].CurrentMember,[DateLoss].[DateLoss].[YearNo])
            ,[MEASURES].[GrsClaimIncurredTotal]
            );

END SCOPE;

I am expecting to seethe measure GrsClaimIncurredTotal summed when I slice by both those hierarchical structures. It does not seem to deliver the correct result, and I think there is a problem with my scope.

I am ultimately trying to do further calculations that applies at this specific scope, and no lower (for example at Claim Number transactions or Month levels, so are trying to enforce this with the scope...

EO
Hertfordshire, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top