dbTalk Databases Forums  

Total by occurence

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


Discuss Total by occurence in the microsoft.public.sqlserver.olap forum.



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

Default Total by occurence - 09-22-2005 , 02:57 AM






Hello,

Imagine a report with VAR1 and VAR2 as class variables and VAR3 for
measure.
I want to calculate the sum of VAR3 by VAR1 and display that report:

VAR1 VAR2 VAR3 SUM
A a 10 20
A b 5 20
A c 5 20
B a 20 22
B d 2 22

thks for your replies.


Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Total by occurence - 09-22-2005 , 03:41 AM






It's a bit hard to answer specifically without knowing a few more
details. I assume var1 and var2 are levels of some dimension, but are
they in the same dimension or different dimensions?

You should be able to create a calculated member that looks something
like the following

SUM([<dimension>].VAR1.CurrentMember,[Measures].VAR3)

Which may work. If this does not work and you don't want to disclose
more details about the structure of your cubes, maybe you could come up
with a similar scenario for the FoodMart 2000 sample cube.

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1127375822.075695.212610 (AT) z14g2000cwz (DOT) googlegroups.com>,
xav29atao (AT) yahoo (DOT) fr says...
Quote:
Hello,

Imagine a report with VAR1 and VAR2 as class variables and VAR3 for
measure.
I want to calculate the sum of VAR3 by VAR1 and display that report:

VAR1 VAR2 VAR3 SUM
A a 10 20
A b 5 20
A c 5 20
B a 20 22
B d 2 22

thks for your replies.



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

Default Re: Total by occurence - 09-23-2005 , 04:23 AM



Hello,

you put me on the right way:

I change my hierarchy used for query the cube and it works well.
I was unable to provide my cube structure because it's not a "sqlserver
cube"

Thks

Xavier


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.