Free Newsletters:
DatabaseJournal  
DBANews
Search Database Journal:
 
HOME News MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc Scripts Links Discussion Video
internet.com

» HOME
» NEWS
» VIDEO
» FEATURES
» SERIES
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Products
Scripts
Links
» DISCUSSION
» TECH JOBS

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner


















VMware CEO Maritz Charts Virtualization's Future

Are We Ready for DTV?

Cisco's Virtual Acceleration Nexus

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers



Related Articles
Introduction to SQL Server 2000 Analysis Services: Handling Time Dimensions
Introduction to SQL Server 2000 Analysis Services: Working with Dimensions
Introduction to SQL Server 2000 Analysis Services: Creating Our First Cube

Senior Quality Management Analyst (PA)
Next Step Systems
US-PA-King of Prussia

Justtechjobs.com Post A Job | Post A Resume
MS SQL
December 13, 2004
Introduction to MSSQL Server 2000 Analysis Services: Semi-Additive Measures and Periodic Balances
By William Pearson

Procedure

Add Semi-Additive Calculated Members to Support Inventory Requirements

We now have a cube within which to build the calculated member which will act as a semi-additive inventory measure. Since no inventory account exists, and since the business requirement is to create a "quick and dirty" inventory level measure for purposes of demonstrating the behavior of a semi-additive measure within MSAS, we will rely upon the Product measures in place to serve as a basis for deriving our new measure.

The DBJ_SemiAdd cube contains two measures, Units Shipped and Units Ordered, which we will use as the basis for our product stocking levels. The measures are depicted in Illustration 7.


Illustration 7: Two Inventory-Related Measures in the Clone Cube

Although it is, admittedly, a rough means of coming to an inventory balance, we remind ourselves that our focus is to produce a conceptual environment to demonstrate the general behavior of semi-additive measures. We can assume for our purposes that Units Ordered less Units Shipped for a given month (as an example time period), equals units that remain, or, in effect, Product stock on hand. Let's create a calculated member based upon this logic, and delve into the considerations surrounding semi-additive measures as we proceed.

1.  Right-click the DBJ_SemiAdd cube, in the cube tree in Analysis Manager.

2.  Select Edit to open the Cube Editor.

3.  Within the Cube Editor, click the Data tab.

Cube data is retrieved, and we are able to see the values that appear for all measures, including the two inventory-related measures we have identified.

4.  Click the Time dimension button in the Filter area of the Data tab.

5.  Drag the Time button onto the top of the Product Family row heading in the Data Grid area.

6.  Drop the Time button onto the Product Family row heading, to swap the Time dimension for the Product dimension in the Row axis.

The "swap" procedure we are undertaking is shown in Illustration 8.


Illustration 8: Swapping the Time Dimension into the Row Axis (Data Grid - Partial View)

The Time dimension now appears on the Row Axis.

7.  Select Insert from the main menu of the Cube Editor.

8.  Select Calculated Member from the cascading menu that appears, as depicted in Illustration 9.


Illustration 9: Select Insert --> Calculated Member

The Calculated Member Builder appears.

9.  Type the following into the Member name box:

Stock Level

10.  Type the following into the Value expression box:

[Measures].[Units Ordered] - [Measures].[Units Shipped]

11.  Click the Check button, at the upper right of the Value expression box, to perform a simple syntax check.

Analysis Manager generates a message box, indicating that "Syntax is OK," as shown in Illustration 10.


Illustration 10: Simple Syntax Check Is Positive ...

12.  Click OK, to close the message box.

The Calculated Member Builder appears as depicted in Illustration 11.


Illustration 11: Calculated Member Builder with Our Additions (Compact View)

13.  Click OK, to accept our input and close the Calculated Member Builder.

The Calculated Member Builder closes, and we are returned to the Data view of the Cube Editor.

The Stock Level calculated member appears in the Data Grid, as shown circled in Illustration 12.


Illustration 12: Stock Level Calculated Member Appears in Data Grid (Partial View)

Now, let's refine the Data Grid to reflect our immediate concentration.

14.  Click the Warehouse dimension button in the Filter area of the Data tab.

15.  Drag the Warehouse button onto the top of the MeasuresLevel row heading in the Data Grid area.

16.  Drop the Warehouse button onto the MeasuresLevel row heading, to swap the Warehouse dimension with MeauresLevel in the Data Grid.

The "swap" procedure we are undertaking is depicted in Illustration 13.

[DJ_ANSYS30-013]


Illustration 13: Swapping the Warehouse Dimension With MeasuresLevel

(Data Grid - Partial View)

The Warehouse dimension now appears (manifested as the Country column heading), as shown (circled) in Illustration 14.


Illustration 14: Warehouse Dimension in the Column Heading

(Data Grid - Partial View)

Let's collapse the Warehouse dimension, which defaulted to expanded mode upon its placement in the steps above, again to refine the view to our immediate focus, the behavior of the Stock Level calculated member.

17.  Right-click the All Warehouses heading that appears immediately underneath the Country heading we noted above.

18.  Select Drill Up from the context menu that appears, as depicted in Illustration 15.


Illustration 15: Select Drill Up to Contract the Warehouse Dimension - Top Level

The Warehouse dimension collapses to a single column. We now need to filter the values that appear in the Data Grid. The values currently represent an aggregate of all measures. We wish to filter the values to isolate our new Stock Level measure.

19.  Select Stock Level from Measures, which we moved to the Filter section in the swap we made with the Warehouse dimension in the immediately preceding steps, as shown in Illustration 16.


Illustration 16: Filtering by the New Stock Level (Calculated) Measure

Go to page: Prev  1  2  3  4  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives







Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL Hot back up halidziya 11 September 29th, 11:01 PM
In and Exist are both slow. Anything else? o1webdawg 1 September 27th, 02:35 PM
Simple Query, but so slow. Any Advice for me? o1webdawg 15 September 26th, 03:42 PM
Slow query execution with strange issue xena 3 September 3rd, 02:29 PM







JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Service Component Architecture Enabling XML Web Services for Java Programmers
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Intel Article: Using Power & Display Context in the Intel Mobile Platform SDK
Internet.com eBook: Real Life Rails
IBM SCA Center Article: Simplifying Composite Applications with Service Component Architecture
Intel PDF: Quad-Core Impacts More Than the Data Center
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Intel PDF: Analysis of Early Testing of Intel vPro in Large IT Departments
Internet.com eBook: Best Practices for Developing a Web Site
Intel PDF: IT Agility through Automated, Policy-based Virtual Infrastructure
IBM CIO Whitepaper: The New Information Agenda. Do You Have One?
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
IBM Whitepaper: Service Component Architecture & Java EE Integration
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
IBM Whitepaper: How are other CIOs driving growth?
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Download: IBM WebSphere Application Server V7.0 Feature Pack for Service Component Architecture
Actuate Download: Free Visual Report Development Tool
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
IBM SCA Download: Start Building SCA Applications Today
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES