Exploring Excel 2013 for BI Tip #9: Adding Calculated Members

As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly about using Excel 2013.  Much of the content will be a result of my daily interactions with business users and other BI devs.  In order to not forget what I learn or discover, I write it down … here.  I hope you too will discover something new you can use.  Enjoy!

Adding Calculated Members to the Excel 2013 Workbook

In my last tip (#8), I discussed using calculated measures.  In this tip, I will talk about creating a calculated member.  The primary difference is that a member becomes a part of a dimension and can be used as a filter, column header, row header, or even a slicer.

In my simple example, I want to created an aggregated set of categories used in my polls called “Cool Cats” which contained the Fun, Entertainment, and Sports categories and puts my new member in the Poll Category attribute hierarchy.  I will use this to see how many submissions there were in these categories.

As before, you can create and manage calculated members from the ANALYZE tab in the PIVOTTABLE TOOLS ribbon.  Use the OLAP Tools menu and select the MDX Calculated Member option.  If you have already created the member, use the Manage Calculations option to edit existing members and measures.


The New Calculated Member dialog is different from the dialog used to edit the member.  Let’s start with the create dialog as noted below.


(1) Assign your measure a name.  It will have to be unique in the context of the the Parent Hierarchy.

(2) Assign the Parent Hierarchy and Parent Member.  This establishes where you plan to locate the new member.  As you can see you can choose any hierarchy you use in your cube.  The Parent Member property lets you choose that first level within the hierarchy.  In my case, I am choosing the Poll Category attribute hierarchy and the All member as the parent.

(3) Create your member with MDX.  Because you are creating a member, it is important that your MDX resolves to a member.  As a side note I used a set initially which passed the Test MDX operation, but displayed as #VALUE in Excel.

(4) Test MDX will allow you verify you have no syntax errors in your member creation.  However, as I noted in step 3 it is not flawless, so you may still have issues even though it is valid syntax.

A couple of important concepts. In my situation, the Cool Cats member stopped at the top level.  If I put this in the Category hierarchy which has multiple levels, Cool Cats would have no children as it is a stand alone member.  However, when applied at a filter level it will filter results properly. The image below shows the filter in use.


Now when I pull the Poll Category hierarchy into the pivot table you will see that Cool Cats is a peer member and has the valid value.  By default Excel will not calculate the Grand Total with those members twice.


You will need to be prepared to properly call this out for your users so the understand how calculated members operate in this scenario.

A common use case for creating calculated members is to create date members that aren’t easily created or tested.  This will allow you to work out the member and how it affects the user experience.


Exploring Excel 2013 for BI Tip #8: Adding Calculated Measures

As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly about using Excel 2013.  Much of the content will be a result of my daily interactions with business users and other BI devs.  In order to not forget what I learn or discover, I write it down … here.  I hope you too will discover something new you can use.  Enjoy!

Adding Calculated Measures to the Excel 2013 Workbook

If you have worked with SQL Server Analysis Services in the past you already know what calculated measures are.  More importantly, you know how to update the MDXScript without requiring a cube refresh.  (If you are unaware of this, check out the BIDS Helper project on CodePlex.)

A calculated measure uses existing measures and MDX to provide additional, shared calculations in a cube.  However, there are many times that the ability to create a calculated measure in Excel would be great.  In Excel 2013, this is now possible.

Once you have connected to a cube using a pivot table, you can add calculated measures using the OLAP Tools menu on the ANALYZE tab.


When you select the MDX Calculated Measure item, it will open an MDX dialog designer in which you can create a measure.  (MDX Calculated Members are will be in the next tip.)


Before we create our measure, let’s talk about the ancillary parts such as the name, folder and measure group.  You will want to give your measure a name.  It needs to be unique within the work you are doing and unique from other measures in the cube or you will get an error.


The folder and measure group are really optional.  It really depends on how you want display the new measures in the Excel Fields window.  I would recommend that folders are used when large volumes of measures are being used.  It is a great way to organize the measures into consumable, related groups for your users.


When you designate the measure group, the measure and folder will be put in the same group as the measure group.  This is appropriate when the measure is related exclusively to the measure group, conceptually if not technically. I usually will only do this if all of the measures come from the same measure group (technically related) or if the user understands that the measure “should” be a part of the measure group even if it is dependent on measures outside of the current measure group (conceptually).

Next, you create the measure.  The Fields and Items tab contains the measures and dimensions available while the Functions tab has the MDX functions you can use.  Use the Test MDX button to verify syntax prior to saving the measure.

The really nice part is that this measure is now contained within the workbook.  It does not get published back to the server.  However, if the measure becomes popular, you can use the MDX from this measure to create a new measure on the server.  It will be business verified before being published.  By using Excel to create calculated measures, you also prevent a glut of single use measures from being created on the server.

Finally, to manage created measures, use the Manage Calculations option on the OLAP Tools menu.  It will open a dialog with all of the calculated measures and calculated members created with this data connection in the workbook.  In my scenario, I used the MyVote Cube connection to create the measure.  Basically, the pivot table is associated with a connection and that is the defacto filter for this list.


Use Excel to test MDX simply.  This will allow you to create measures, verify data, then deploy working code.  It is a great addition to the product.

Next up… Calculated Members.

The Changing World of BI, A New White Paper for Magenic

MagenicLogo2012x70tallIn the ever changing landscape that is Business Intelligence (or is that Business Analytics?), a fellow business analyst from Magenic, Chuck Whittemore (B), and I authored a white paper based on our experiences over the past months.

What I think makes our work unique, a BI architect and a business analyst came together to show our worlds colliding in the age of modern BI tools.  While the goal has always been to bring the data to the users and let them work with it as creatively as possible, the tools to do this were IT focused.  What we see now is that with the advent of in-memory, client-side BI tools, users are now able to get to this on their own.  Microsoft has invested heavily in Excel to make it a first-class BI tool.  Our paper discusses this disruptive nature of the new tools and how Excel is being pushed to the next level.  After all, Excel is everywhere already.

Enjoy the read and I welcome your feedback.

The Changing World of Business Intelligence: Leading with Microsoft Excel