Prologika Forums
Making sense of data

Scope MDX

rated by 0 users
Answered (Verified) This post has 0 verified answers | 3 Replies | 2 Followers

Top 75 Contributor
Male
9 Posts
Chris posted on Wed, Jan 27 2010 4:56 PM

Hello

I'm hoping someone can clear up my understanding of the Scope statement in the MDX script.  The high level overview of my project is to determine the Weeks On Hand (WOH) for every finished goods and raw material used in our manufacturing across all countries in all plants.  We use a comparison of actual inventory amounts separately compared to the original budget, revised budget and current budget.  So in turn I have about 21 MDX expressions (Calculated Members) for each of the three budgets totaling 63 to ultimately get me the totals I am looking for.

A business requirement now is to only calculate WOH on inventory based on an "active" status, a set of "obsolete codes" and a "demand status".   I want to use the Scope statement to encapsulate/ filter my expressions with the correct codes.  I wrote a Scope statement without a "this" statement in my MDX script where these expressions start.  I wrote an End Scope statement after my expressions.

My understanding is that a sub cube would be created and that my calculated members would calculate against a "pre-filtered" sub cube only containing the measures I wanted.  Some measures that don't fit the correct criteria are getting calculated and I am wondering if I don't understand how to use the Scope statement correctly.

Thanks

Chris

 

 

 

All Replies

Top 10 Contributor
1,857 Posts

A scope assignment doesn't provide a context where the calculated members are evaluated. Instead, a scope assignment is used to overwrite the cube space. So, a scope assignment without an assignment, such as the this operator, that write to the cube space is useless.

Top 75 Contributor
Male
9 Posts
Chris replied on Fri, Jan 29 2010 11:30 AM

Thanks so much for getting back to me so quickly.  I knew that I could change the cube space with the Scope assignment, but I was trying to "think out of the box" and thought I might be able to pull off using it for a "non- traditional" use to solve a problem.  There are multiple "obsolete code" members I have to include in my expressions as well as the two other additional dimensions.  Using a Named set ended up not being practical, either.  Ultimately I flagged the codes I needed back in the data warehouse and built another heriarchy which I could reference easily in my tuple expressions.  Now on to once again testing the numbers.......  Thanks again

Top 10 Contributor
1,857 Posts

This sounds like a good approach to me.

Page 1 of 1 (4 items) | RSS