Home > Archive > MS SQL Server OLAP > September 2005 > Total by occurence









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Total by occurence
xav

2005-09-22, 3:23 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.

Darren Gosbell

2005-09-22, 7:23 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_do
t_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1127375822.075695.212610@z14g2000cwz.googlegroups.com>,
xav29atao@yahoo.fr says...
> 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.
>
>

xav

2005-09-23, 7: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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com