Report Portal

Comparing Levels in MDX and CONDITION vs. SCOPE in cell calculations (By Mosha Pasumansky)

A follow up to the “Comparing Members in MDX” blog (archived here). I just run across a thread on OLAP forum hosted at sql.ru, where someone makes a suggestion to exclude level from calculation by applying this formula:

[Products].CurrentMember.Level.Name <> "Assortiment"

Similar arguments as in the “Comparing Members in MDX” apply here. From the correctness point of view this is almost always correct (It seems that it is unlikely to ever cause correctness problems, since level names inside hierarchy are unique, but actually it can, although in pretty corner cases. The correctness issue arises from the fact that string comparison in MDX queries is done using the client locale (or more precisely using client collation). Usually, collation in string comparison only affects the order, i.e. "less" and "greater" operators, but in some Asian languages depending on collation different characters can be considered as equal or not equal , for example with Katakana and Hiragana in Japanese).

Read more...

Tags: mdx

 

2007-2015 VidasSoft Systems Inc.