Report Portal

MDX: Rewrite query with CurrentMember for multiple selection

One of famous MDX issues is that you cannot use "CurrentMember" keyword when you have multiple selection on an attribute. Read Mosha's article to understand the full picture. In a few words, the solution is based on using EXISTING and EXISTS keywords. EXISTING filters a set of members to selected members only, it's in fact the "currentmembers" missing keyword. EXISTS is a function that returns members of first set that are included in the second set. I'd like to show 2 concrete samples how to rewrite your query. You can run them on Adventure Works DW OLAP DB. Anyway it's important to notice that not every query/measure can be rewritten in this way, and sometimes the best way is to change the approach to the solution.

Read more...

 

Tags: mdx

 

2007-2015 VidasSoft Systems Inc.