Free Newsletters:
DatabaseJournal  
DBANews
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» Database News
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Apple: 1M New iPhones Sold, Apologies for Snafus

T-Mobile's Next Android Phone: myTouch 3G

Firms Push Cloud, Virtualization for IT Niches

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

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


Database Journal | DBA Support | SQLCourse | SQLCourse2







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

Accountant/Functional Oracle Financial Analyst (IL)
Next Step Systems
US-IL-Schaumburg

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MS SQL

December 13, 2004

Introduction to MSSQL Server 2000 Analysis Services: Semi-Additive Measures and Periodic Balances

By William Pearson




Finally, we will expand the Time dimension to make the workings of our Stock Level measure readily apparent, with regard to how it accumulates value over time.



20.  Right-click the Year heading over the Row Axis.



21.  Select Drill Down from the context menu that appears, as depicted in Illustration 17.




Illustration 17: Select Drill Down to Expand the Year Level - Time Dimension



The Year level expands, revealing the underlying Quarter level.



22.  Drill down on the Quarter level, just as we did for the Year level above.



The Data Grid now resembles that shown in Illustration 18.




Illustration 18: Data Grid - Drilled to Month Level

Let's take a look at a zoom of a single year to get a feel for what is happening in our Data Grid. As we can see from the two annotated examples below, the Year 1997 Total (the "sum of the 2's," in Illustration 19) is a simple total of the four Quarters that make it up, and the Q1 Total (the "sum of the 1's," in Illustration 19), represents a simple total of its member Months 1, 2, and 3. This behavior is consistent throughout the dataset, although we use Year 1997 only in our examples in Illustration 19.


Illustration 19: Fully Additive Behavior of Stock Level in Our DataSet (Year 1997 Only)

While this simple summing would be quite appropriate for many measures (such as sales, expense, and other common income statement accounts, among others), semi-additive measures such as Stock Level do not, as we have discussed, appropriately add up in this way. For this reason, we need to make an adjustment in our calculated member that takes into consideration the fact that we wish to present the balance at the end of each time period as that of the last member of the respective period (say Month 3 of Q1, or Q4 of Year 1997, in our two illustrated examples above),

Let's make our adjustment now, and ascertain the correct results with the modified Stock Level calculated member.

23.  Right-click the Stock Level calculated member.

24.  Select Edit from the context menu that appears.

25.  Modify the Value expression to the following:


(ClosingPeriod([Month]),[Measures].[Units Ordered]) - 

    (ClosingPeriod([Month]),[Measures].[Units Shipped])

26.  Click the Check button, to the upper right of the Value expression box, to perform a simple syntax check, once again.

Analysis Manager generates a message box, indicating that "Syntax is OK", once more. (If this is not the result, check your syntax input).

27.  Click OK, to close the message box.

The Calculated Member Builder appears, with our modifications, as depicted in Illustration 20.


Illustration 20: Calculated Member Builder with Our Modifications (Compact View)

28.  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 Data Grid should reappear, with new values to reflect our changes, as shown in Illustration 21.


Illustration 21: New Values in the Data Grid ...

A quick review of the values reveals that we have, indeed, accomplished our objective, modifying the behavior of Stock Level measure to reflect its intended, semi-additive nature. As we see in the subset of the data, wherein we highlight parallel examples to those we noted above, the balance found in the "last" member (for both Quarter and Year) is the value retained as the "final" balance of the respective parent.


Illustration 22: Semi-Additive Behavior of Stock Level in Our DataSet (Year 1997 Only, Again)

NOTE: For more information on the ClosingPeriod() function, see my Database Journal article MDX Time Series Functions, Part II: The OpeningPeriod () and ClosingPeriod() Functions.

29.  Select File --> Exit to leave the Cube Editor, when ready (saving the cube, when prompted).

We are returned to the Analysis Manager console.

30.  Select File --> Exit to leave Analysis Services, when desired.

Conclusion

In this article, we explored the nature and management of semi-additive measures, creating a calculated measure that is not fully additive, to meet the business requirements of a hypothetical group of information consumers. After discussing the nature of semi-additive measures, and describing uses for which they are appropriately employed, we created and processed a copy of the Warehouse sample cube in preparation for our practice example. We next established an illustrative set of business requirements as a specification for creating a semi-additive measure (a calculated member) in our practice cube.

We explored an initial approach to creating a simple inventory balance calculated measure, and explained why it was ineffective for our needs, due to its fully additive nature. We then modified the calculated measure to exhibit the desired semi-additive behavior of an inventory balance measure. Throughout the practice example, we discussed the results datasets obtained, within each of the steps we undertook to meet the expressed business requirements, verifying the effectiveness of our final solution.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

Introduction to MSSQL Server Analysis Services Series
Part 81: Attribute Discretization: Using the “Equal Areas” Method
Part 80: Attribute Discretization: Using the Automatic Method
Part 79: Introduction to Attribute Discretization
Part 78: More Exposure to Settings and Properties in Analysis Services Attribute Relationships
Part 77: Attribute Relationships: Settings and Properties
Part 76: Introduction to Attribute Relationships in MSSQL Server Analysis Services
Part 75: Attribute Member Values in Analysis Services
Part 74: MSSQL Analysis Services - Attribute Member Names
Part 73: Attribute Member Keys – Pt 2: Composite Keys
Part 72: Attribute Member Keys – Pt 1: Introduction and Simple Keys
Part 71: Dimension Attributes: Introduction and Overview, Part V
Part 70: Dimension Attributes: Introduction and Overview, Part IV
Part 69: Dimension Attributes: Introduction and Overview, Part III
Part 68: Dimension Attributes: Introduction and Overview, Part II
Part 67: Dimension Attributes: Introduction and Overview, Part I
Part 66: Dimensional Model Components: Dimensions Part II
Part 65: Dimensional Model Components: Dimensions Part I
Part 64: Manage Unknown Members in Analysis Services 2005, Part II
Part 63: Manage Unknown Members in Analysis Services 2005, Part I
Part 62: Alternatively Sorting Attribute Members in Analysis Services 2005
Part 61: Introduction to Linked Objects in Analysis Services 2005
Part 60: Distinct Counts in Analysis Services 2005
Part 59: Positing the Intelligence: Conditional Formatting in the Analysis Services Layer
Part 58: Administration and Optimization: SQL Server Profiler for Analysis Services Queries
Part 57: Mastering Enterprise BI: Time Intelligence Pt. II
Part 56: Mastering Enterprise BI: Time Intelligence Pt. I
Part 55: Design and Documentation: Introducing the Visio 2007 PivotDiagram
Part 54: Actions in Analysis Services 2005: The URL Action
Part 53: Actions in Analysis Services 2005: The Drillthrough Action
Part 52: Mastering Enterprise BI: Introducing Actions in Analysis Services 2005
Part 51: Mastering Enterprise BI: Introduction to Translations
Part 50: Mastering Enterprise BI: Introduction to Perspectives
Part 49: Introduction to the Analysis Services 2005 Query Log
Part 48: Mastering Enterprise BI: Working with Measure Groups
Part 47: Mastering Enterprise BI: Introduction to Key Performance Indicators
Part 46: Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. II
Part 45: Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. I
Part 44: Process Analysis Services Objects with Integration Services
Part 43: Usage-Based Optimization in Analysis Services 2005
Part 42: Named Sets Revisited
Part 41: Migrating an Analysis Services 2000 Database to Analysis Services 2005
Part 40: Introducing Data Source Views
Part 39: Reporting Options for Analysis Services Cubes: MS Excel 2003 and More ...
Part 38: Mastering Enterprise BI: Create Aging "Buckets" in a Cube
Part 37: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube, Part II
Part 36: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube
Part 35: Process Analysis Services Cubes with DTS
Part 34: Presentation Nuances: CrossTab View - Same Dimension
Part 33: Point-and-Click Cube Schema Simplification
Part 32: Manage Distinct Count with a Virtual Cube
Part 31: Distinct Count Basics: Two Perspectives
Part 30: Semi-Additive Measures and Periodic Balances
Part 29: Performing Incremental Cube Updates - An Introduction
Part 28: Partitioning a Cube in Analysis Services - An Introduction
Part 27: Basic Storage Design
Part 26: Derived Measures vs. Calculated Measures
Part 25: Creating a Dynamic Default Member
Part 24: Another Approach to Local Cube Design and Creation
Part 23: Introduction to Local Cubes
Part 22: Actions in Virtual Cubes
Part 21: Putting Actions to Work in Regular Cubes
Part 20: Reporting Options for Analysis Services Cubes: ProClarity Part II
Part 19: Reporting Options for Analysis Services Cubes: ProClarity Professional, Part I
Part 18: Using Calculated Cells in Analysis Services , Part II
Part 17: Using Calculated Cells in Analysis Services, Part I
Part 16: MSAS Administration and Optimization: Toward More Sophisticated Analysis
Part 15: MSAS Administration and Optimization: Simple Cube Usage Analysis
Part 14: Build a Web Site Traffic Analysis Cube: Part II
Part 13: Build a Web Site Traffic Analysis Cube: Part I
Part 12: Reporting Options for Analysis Services Cubes: Cognos PowerPlay
Part 11: Reporting Options for Analysis Services Cubes: MS FrontPage 2002
Part 10: Reporting Options for Analysis Services Cubes: MS Excel 2002
Part 9: Drilling Through to Details: From Two Perspectives
Part 8: Custom Cubes: Financial Reporting - Part II
Part 7: Custom Cubes: Financial Reporting
Part 6: Exploring Virtual Cubes
Part 5: Working with the Cube Editor
Part 4: Parent-Child Dimensions
Part 3: Handling Time Dimensions
Part 2: Working with Dimensions
Part 1: Creating Our First Cube

Go to page: Prev  1  2  3  4  

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
Linked Server sowmyav 6 June 23rd, 05:42 AM
SORT_IN_TEMPDB index option robpatt 1 June 22nd, 02:05 PM
Oracle 10g Upgrade akj004 2 June 22nd, 11:43 AM
Rowguid Column yogesphu 1 June 22nd, 11:41 AM