New function for MDX 🙂
A few weeks ago I saw Rob Collie’s blog post about the DAX Divide() function, and I was a bit surprised that I hadn’t seen it before. Then, yesterday, I found that the same function has appeared in MDX in SSAS 2012 Multidimensional. Here’s the entry in BOL:
The syntax is:
Divide (<numerator>, <denominator> [,<alternateresult>])
Numerator and Denominator are self-explanatory; alternateresult is the constant value you want to return in case of division by zero, and if it is not specified a null is returned.
It turns out that it was added after RTM of SSAS 2012, and officially first appeared in SSAS 2012 SP1. This is the first new MDX function since… what, 2005? 2008? Five long years at least.
[A loud bump is heard as Chris falls off his chair in amazement]
This is important because there have been requests for a safe divide function in MDX…
View original post 271 more words