dbTalk Databases Forums  

Slicing the descendants

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


Discuss Slicing the descendants in the microsoft.public.sqlserver.olap forum.



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

Default Slicing the descendants - 08-02-2005 , 10:26 AM






Based on the following formula
Sum(Descendants(Store.CurrentMember,Store),Val(Sto re.Currentmember.Properties("Store Square Meters")))

I'm trying to do something like
Sum({(Descendants(Store.CurrentMember,Store),Store Type)},Val(Store.Currentmember.Properties("Store Square Meters")))

In other words, for any level of the Store dimension, get the total selling
space. However, this should be sliced by the StoreType dimension. For a tuple
corresponding to StoreType1, only the StoreSquareMeters of descendants of
type StoreType1 should be aggregated.

Reply With Quote
  #2  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default RE: Slicing the descendants - 08-03-2005 , 03:52 AM






Hello Pat,

Did you try Crossjoin function for the situation?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.



================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Quote:
Thread-Topic: Slicing the descendants
thread-index: AcWXdo1wCdULmCyxRTCldAqYPBJJ1g==
X-WBNR-Posting-Host: 84.147.148.168
From: =?Utf-8?B?UGF0?= <pat (AT) online (DOT) nospam
Subject: Slicing the descendants
Date: Tue, 2 Aug 2005 08:26:28 -0700
Lines: 10
Message-ID: <137FC5A8-2C85-405F-A5FE-93DAF171146B (AT) microsoft (DOT) com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:13502
X-Tomcat-NG: microsoft.public.sqlserver.olap

Based on the following formula:
Sum(Descendants(Store.CurrentMember,Store),Val(Sto re.Currentmember.Propertie
s("Store Square Meters")))
Quote:
I'm trying to do something like:
Sum({(Descendants(Store.CurrentMember,Store),Store Type)},Val(Store.Currentme
mber.Properties("Store Square Meters")))
Quote:
In other words, for any level of the Store dimension, get the total
selling
space. However, this should be sliced by the StoreType dimension. For a
tuple
corresponding to StoreType1, only the StoreSquareMeters of descendants of
type StoreType1 should be aggregated.



Reply With Quote
  #3  
Old   
Pat
 
Posts: n/a

Default RE: Slicing the descendants - 08-08-2005 , 06:06 AM



I tried the following and got #ERR in every cell:
Sum(Descendants(crossjoin({[Store
Type]},{Store}),Store),Val(Store.Currentmember.Properti es("Store Square
Meters")))


"Peter Yang [MSFT]" wrote:

Quote:
Hello Pat,

Did you try Crossjoin function for the situation?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.



================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Slicing the descendants
| thread-index: AcWXdo1wCdULmCyxRTCldAqYPBJJ1g==
| X-WBNR-Posting-Host: 84.147.148.168
| From: =?Utf-8?B?UGF0?= <pat (AT) online (DOT) nospam
| Subject: Slicing the descendants
| Date: Tue, 2 Aug 2005 08:26:28 -0700
| Lines: 10
| Message-ID: <137FC5A8-2C85-405F-A5FE-93DAF171146B (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:13502
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| Based on the following formula:
Sum(Descendants(Store.CurrentMember,Store),Val(Sto re.Currentmember.Propertie
s("Store Square Meters")))
|
| I'm trying to do something like:
Sum({(Descendants(Store.CurrentMember,Store),Store Type)},Val(Store.Currentme
mber.Properties("Store Square Meters")))
|
| In other words, for any level of the Store dimension, get the total
selling
| space. However, this should be sliced by the StoreType dimension. For a
tuple
| corresponding to StoreType1, only the StoreSquareMeters of descendants of
| type StoreType1 should be aggregated.
|



Reply With Quote
  #4  
Old   
Pat
 
Posts: n/a

Default RE: Slicing the descendants - 08-08-2005 , 06:46 AM



Sorry, I now rewrote the query and it's working fine. Many thanks. Here is
the working version:

sum(nonemptycrossjoin({Descendants(Store.CurrentMe mber,Store)},{[Store
Type].CurrentMember}),
Val(Store.Currentmember.Properties("Store Square Meters")))


"Peter Yang [MSFT]" wrote:

Quote:
Hello Pat,

Did you try Crossjoin function for the situation?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.



================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Slicing the descendants
| thread-index: AcWXdo1wCdULmCyxRTCldAqYPBJJ1g==
| X-WBNR-Posting-Host: 84.147.148.168
| From: =?Utf-8?B?UGF0?= <pat (AT) online (DOT) nospam
| Subject: Slicing the descendants
| Date: Tue, 2 Aug 2005 08:26:28 -0700
| Lines: 10
| Message-ID: <137FC5A8-2C85-405F-A5FE-93DAF171146B (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:13502
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| Based on the following formula:
Sum(Descendants(Store.CurrentMember,Store),Val(Sto re.Currentmember.Propertie
s("Store Square Meters")))
|
| I'm trying to do something like:
Sum({(Descendants(Store.CurrentMember,Store),Store Type)},Val(Store.Currentme
mber.Properties("Store Square Meters")))
|
| In other words, for any level of the Store dimension, get the total
selling
| space. However, this should be sliced by the StoreType dimension. For a
tuple
| corresponding to StoreType1, only the StoreSquareMeters of descendants of
| type StoreType1 should be aggregated.
|



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.