Book Image

Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide

By : Abolfazl Radgoudarzi, Reza Rad
Book Image

Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide

By: Abolfazl Radgoudarzi, Reza Rad

Overview of this book

Table of Contents (19 chapters)
Microsoft SQL Server 2014 Business Intelligence Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – calculated members


Calculated members help to perform calculation based on measures, dimension hierarchies, and MDX functions. They are very helpful for covering business requirements with the help of a cube. In this example, we will create a new calculated member for Profit.

  1. In the cube designer, go to the Calculations tab.

  2. Create a new calculated member by clicking on the button that is magnified in the next screenshot.

  3. Rename the calculated member to [Profit].

  4. Write the following expression in the Expression field:

    [Measures].[Sales Amount] - [Measures].[Total Product Cost]
  5. Set the format string as "Currency".

  6. Deploy and process this procedure, and then browse the cube with the Product Category hierarchy and a Profit measure.

What just happened?

In this extremely simple example, we created a profit column based on the total product cost and the sales amount. The MDX expression used here is very simple; as you can see, you don't need to write the whole select statement, you...