O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Context-aware Calculations

In this chapter, we will cover:

  • Identifying the number of columns and rows a query will return
  • Identifying the axis with measures
  • Identifying the axis without measures
  • Adjusting the number of columns and rows for OWC and Excel
  • Identifying the content of axes
  • Calculating row numbers
  • Calculating the bit-string for hierarchies on an axis
  • Preserving empty rows
  • Implementing utility dimension with context-aware calculations

Introduction

Context-aware calculations are calculations relative to the result of an MDX query.

First, let's explain what the term "relative" means in this case.

Calculations can be relative to the set on an axis or a part of it. The rank on set, percentage in set, percentage of parent, average among siblings, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required