dbTalk Databases Forums  

Re: Descendant Count of CurrentMemeber with Multiple Pivot Selection

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Re: Descendant Count of CurrentMemeber with Multiple Pivot Selection in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Descendant Count of CurrentMemeber with Multiple Pivot Selection - 03-04-2004 , 01:13 AM






The problem is that, when you filter by multiple members of a dimension,
a calculated member gets created on that dimension, which goes in the
MDX "where" slicer, like:

Aggregate({[Manager1],[Manager2]})

But such a [Manager] member technically has no descendants, so your
calculated measure returns a count of 0.


The only work-around that I can think of is tedious (maybe someone else
in the group has a better idea):

- Create a second cube with the [Manager] dimension table as its
"fact-less" fact table, and only the [Manager] dimension. This may
require a bit of tweaking.

- Define just a Count measure like [WorkerCount]. I assume that each
table record corresponds to a leaf [Worker], so that this gives the
number of workers for any member.

- Combine the original cube and this cube in a virtual cube.
Define a calculated measure in the virtual cube like
ValidMeasure([WorkerCount]), so that it ignores dimensions other than
[Manager]. This returns the desired value.


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Ken Mayers
 
Posts: n/a

Default Re: Descendant Count of CurrentMemeber with Multiple Pivot Selection - 03-05-2004 , 12:41 PM






That makes perfect sense as to why it is returning nothing. Is there any way to get to the MDX statement coming back from the OWC and use that in the calculated measure?

The virtual cube fix should work but I have several calculated measures using currentmember and I would need a cube for each.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.