dbTalk Databases Forums  

Flattened row set based on more than one dimension

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


Discuss Flattened row set based on more than one dimension in the microsoft.public.sqlserver.olap forum.



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

Default Flattened row set based on more than one dimension - 09-09-2004 , 03:22 PM






Hi,

I have a cube with 3 dimensions: Dim1, Dim2, Dim3 based on a fact
table containing users transaction details

Dim1 has two levels : level1, Level2
Dim2 and Dim3 has one level

Iam using the below query to get each users transacted amount over the
last two months based on dim1, dim2 and dim3.

With Member Measures.PeerGroup As
'[Dim1].currentmember.parent.parent.uniquename'
select {
Measures.[PeerGroup], Measures.[amt], Measures.[Count]} on
columns,
{nonEmptyCrossjoin([dim1].[Id].members, [dim2].members,
[dim3].[trantype].members)}
Dimension PROPERTIES [Id].Name + [dim2].[Type].Name +
[dim3].[trantype].Name on rows
from tobtest where ([trandate].&[2004].&[3].&[8])

I get the following result:
cust1 Type1 trantype1 [dim1].[all cust].[finservices].[] 10000 1
Type1 trantype2 [dim1].[all cust].[finservices].[] 9000 1
Type1 trantype3 [dim1].[all cust].[finservices].[] 2000 1
cust2 Type1 trantype1 [dim1].[all cust].[finservices].[] 10000 1
Type1 trantype2 [dim1].[all cust].[finservices].[] 9000 1
Type1 trantype3 [dim1].[all cust].[finservices].[] 2000 1

I would like to concatenate the [dim2].[type].name,
[dim3].[trantype].Name with peergroup and return result set as
follows

cust1 [dim1].[all cust].[finservices].[];Type1;trantype1
10000 1
[dim1].[all cust].[finservices].[];Type2;trantype2 9000
1
[dim1].[all cust].[finservices].[]Type3;trantype3 2000
1
cust2 [dim1].[all cust].[finservices].[];Type1;trantype1
10000 1
[dim1].[all cust].[finservices].[];Type2;trantype2 9000
1
[dim1].[all cust].[finservices].[]Type3;trantype3 2000
1

Is this possible to do.

I appreciate any help.

Thanks

Reply With Quote
  #2  
Old   
Mingqing Cheng [MSFT]
 
Posts: n/a

Default RE: Flattened row set based on more than one dimension - 09-10-2004 , 09:31 AM






Hi Vijaya,

From your descriptions, I understood that you would love to put [dim1].[all
cust].[finservices].[] ahead. Have I understood you? If there is anything I
misunderstood, please feel free to let me know.

Based on my scope, we could not make it like this and I will do more
research on this and keep you updated ASAP.

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!


Reply With Quote
  #3  
Old   
Mingqing Cheng [MSFT]
 
Posts: n/a

Default RE: Flattened row set based on more than one dimension - 09-11-2004 , 03:03 AM



Hi Vijaya,

Since the PeerGroup is on column and the following set are cross joined, I
think it is not possible to display the result as you expect.

[dim1].[Id].members, [dim2].members,[dim3].[trantype].members

Also, I was not able to find a workaround because above sets are
cross-joined.

Please refer to "Using member properties" and "NonEmptyCrossjoin" topics in
Books online for more related information

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!



Reply With Quote
  #4  
Old   
Mingqing Cheng [MSFT]
 
Posts: n/a

Default RE: Flattened row set based on more than one dimension - 09-15-2004 , 07:33 AM



Hi Vijaya,

I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!



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.