Newsletter
Join our blog
Join other Azure, Power Platform and SQL Server pros by subscribing to our blog.
Start with the FREE community plan and get your lifetime access to 20+ courses. Get Instant Access Now!
Need help? Talk to an expert: (904) 638-5743
Private Training
Customized training to master new skills and grow your business.
On-Demand Learning
Beginner to advanced classes taught by Microsoft MVPs and Authors.
Bootcamps
In-depth boot camps take you from a novice to mastery in less than a week.
Season Learning Pass
Get access to our very best training offerings for successful up-skilling.
Stream Pro Plus
Combine On-Demand Learning platform with face-to-face Virtual Mentoring.
Certification Training
Prepare and ace your next certification with CertXP.
Private Training
All Courses
View all of the courses available on our on-demand learning platform.
By Learning Path
Explore our courses based on role-specific learning path.
By Product
Find all of the courses for the product you want to master.
Power BI
Turn data into actionable insights with our Power BI courses
Power Apps
Learn to build custom business solutions with ease
Cheat Sheets
Quick references for when you need a little guidance.
Nerd Guides
Summaries developed in conjunction with our Learn with the Nerds sessions.
Downloads
Digital goodies - code samples, student files, and other must have files.
Blog
Stay up-to-date on all things Power BI, Power Apps, Microsoft 365 and Azure.
Community Discord Server
Start here for technology questions to get answers from the community.
Career Guides
Breaking into the field? Let these guides help get you started with a plan.
Affiliate Program
Earn money by driving sales through the Pragmatic Works' Training Affiliate Program.
Reseller Partner
It's time to address your client's training needs.
Foundation
Learn how to get into IT with free training and mentorship.
Management Team
Discover the faces behind our success: Meet our dedicated team
Contact Us
How can we help? Connect with Our Team Today!
FAQs
Find all the information you’re looking for. We’re happy to help.
It's been a little while, but Steve Hughes is back for his latest blog in the Excel at Excel series. In this blog, he will discuss adding calculated measures when working with SSAS in Excel.
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.
ABOUT THE AUTHOR
Free Trial
private training
Newsletter
Join other Azure, Power Platform and SQL Server pros by subscribing to our blog.
Leave a comment