O'Reilly logo

MDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition by Sherry Li, 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

Implementing unary operators

Unary operators are a way to bypass custom rollups in parent-child dimensions. Custom rollups, either built-in or the ones we created one recipe before, use MDX expressions to calculate the value of a member that has it defined. Unary operators use a simple character, most commonly a +, -, or ~ sign to instruct SSAS how that member aggregates into its parent. A plus means it is added, minus subtracted, and ~ means it doesn't aggregate at all.

Look at the last screenshot in the previous recipe. Item # of Orders is the aggregated value of two of its children. However, all three of them, that item and its children have MDX expressions that tell which value to display. We can simplify this. Instead of specifying an MDX ...

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