dbTalk Databases Forums  

Top Level Member

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


Discuss Top Level Member in the microsoft.public.sqlserver.olap forum.



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

Default Top Level Member - 12-11-2004 , 11:41 AM






I want to find the top level member two members before the parent of the
member parent. Is this possible.

Eg. Top level had 3 parents D, E and F
Member K is a child of member F and is on level 5.
I want to get the member D which I know is on the same level of member F
but two members back from the parent F.

Any assistance will be greatfully accepted.



Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Top Level Member - 12-11-2004 , 10:02 PM






use the Ancestor function

Ancestor(dimension.currentmember, <target level>)

Ancestor(dimension.currentmember, 0) return the parent member at the first
level of the dimension.


"henry" <henry (AT) spamnot (DOT) com> a écrit dans le message de news:
%23Z0E7363EHA.2540 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
I want to find the top level member two members before the parent of the
member parent. Is this possible.

Eg. Top level had 3 parents D, E and F
Member K is a child of member F and is on level 5.
I want to get the member D which I know is on the same level of member
F
but two members back from the parent F.

Any assistance will be greatfully accepted.





Reply With Quote
  #3  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: Top Level Member - 12-12-2004 , 11:35 AM



Jeje's suggestion will return you member F. The following will return you
member 'D'
Ancestor(<K>, 0).lag(2)

cheers
Jamie
http://blogs.conchango.com/jamiethomson

"Jéjé" wrote:

Quote:
use the Ancestor function

Ancestor(dimension.currentmember, <target level>)

Ancestor(dimension.currentmember, 0) return the parent member at the first
level of the dimension.


"henry" <henry (AT) spamnot (DOT) com> a écrit dans le message de news:
%23Z0E7363EHA.2540 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I want to find the top level member two members before the parent of the
member parent. Is this possible.

Eg. Top level had 3 parents D, E and F
Member K is a child of member F and is on level 5.
I want to get the member D which I know is on the same level of member
F
but two members back from the parent F.

Any assistance will be greatfully accepted.






Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: Top Level Member - 12-12-2004 , 02:10 PM



well...
returning a particular member don't need this type of function
maybe I dont understand clearly what is requiered

if you need allways the member "D" then use its uniquename
dimension.[Member D]

if you need a sibling member of your parent member, then the formula
describe by Jamie is good.


"Jamie Thomson" <jamie.thomson (AT) donotspam (DOT) conchango.com> a écrit dans le
message de news: DD4C71B8-2E07-4597-9C80-ED87625A517B...soft (DOT) com...
Quote:
Jeje's suggestion will return you member F. The following will return you
member 'D'
Ancestor(<K>, 0).lag(2)

cheers
Jamie
http://blogs.conchango.com/jamiethomson

"Jéjé" wrote:

use the Ancestor function

Ancestor(dimension.currentmember, <target level>)

Ancestor(dimension.currentmember, 0) return the parent member at the
first
level of the dimension.


"henry" <henry (AT) spamnot (DOT) com> a écrit dans le message de news:
%23Z0E7363EHA.2540 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I want to find the top level member two members before the parent of the
member parent. Is this possible.

Eg. Top level had 3 parents D, E and F
Member K is a child of member F and is on level 5.
I want to get the member D which I know is on the same level of
member
F
but two members back from the parent F.

Any assistance will be greatfully accepted.








Reply With Quote
  #5  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: Top Level Member - 12-12-2004 , 02:23 PM



Good point. Perhaps its a time hierachy and Henry is interested in comparing
to 2 year's ago or something.

I agree though...it does seem to be a strange requirement!

cheers
Jamie
http://blogs.conchango.com/jamiethomson

"Jéjé" wrote:

Quote:
well...
returning a particular member don't need this type of function
maybe I dont understand clearly what is requiered

if you need allways the member "D" then use its uniquename
dimension.[Member D]

if you need a sibling member of your parent member, then the formula
describe by Jamie is good.


"Jamie Thomson" <jamie.thomson (AT) donotspam (DOT) conchango.com> a écrit dans le
message de news: DD4C71B8-2E07-4597-9C80-ED87625A517B...soft (DOT) com...
Jeje's suggestion will return you member F. The following will return you
member 'D'
Ancestor(<K>, 0).lag(2)

cheers
Jamie
http://blogs.conchango.com/jamiethomson

"Jéjé" wrote:

use the Ancestor function

Ancestor(dimension.currentmember, <target level>)

Ancestor(dimension.currentmember, 0) return the parent member at the
first
level of the dimension.


"henry" <henry (AT) spamnot (DOT) com> a écrit dans le message de news:
%23Z0E7363EHA.2540 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I want to find the top level member two members before the parent of the
member parent. Is this possible.

Eg. Top level had 3 parents D, E and F
Member K is a child of member F and is on level 5.
I want to get the member D which I know is on the same level of
member
F
but two members back from the parent F.

Any assistance will be greatfully accepted.









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.