dbTalk Databases Forums  

percentage roll up

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


Discuss percentage roll up in the microsoft.public.sqlserver.olap forum.



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

Default percentage roll up - 07-20-2004 , 12:58 PM






hi,

create a calculated member
named max
in the value xpression give it as 1/100 * 100

and now create another calculated member and in the value
xpression give an iif condition like

IIF([Measures].[Upper Control]>[Measures].[Max],[Measures].
[Max],[Measures].[Mean])

did i make my self clear ??

bye
Quote:
-----Original Message-----
Hi,

i think this could be a challenge. I haven't found
anything yet (that helped) to resolve this.
I have the following:
2003:
January 100%
February 100%
March 100%
.....
2004:
January 100%
February 100%
March 100%
......

When rolling up, 2003 will get a total of 300% and 2004
will also be 300%. On higher level even 600%. Well,
because the 'maximum' is 'always' 100%. I want to show on
every row 100%, no matter if on month level, year level
and top level.
Quote:
There is also a region dimension involved.
How can i achieve this? I've tried it with Calculated
Cells, but no results.

Thanks in advance.

Stan
.


Reply With Quote
  #2  
Old   
Stanley
 
Posts: n/a

Default RE: percentage roll up - 07-21-2004 , 03:24 AM






Hi Alex,

thnx for your response. Well,actually this is something i've already tried, but it's not good enough.
First of all, to give you a tip, when doing it your way, it's already enough to just create a calculated member and set the value for that to 100%. When rolling up, no matter which level, it will always be 100%. So, creating another calculated member is not necessary.
Second, this example uses a hardcoded value. My example wasn't a very good one, because i forgot to mention something else...oops...

So, actually i have another dimension as said before, which is a region level. it looks something like this:

Region Country
------------------
EMEA Belgium
Spain
LATAM Brazil
Mexico
Colombia
........

these countries all have targets. to complete the example i used it looks like this:
Belgium Spain EMEA
2003:
January 100% 90% 190%
February 80% 100% 180%
March 100% 80% 180%
.....
2004:
January 90% 20% 110%
February 100% 20% 120%
March 100% 30% 130%

As you can see it's not always 100%.

When rolling up to region level i get a sum of these percentage (last column), where i should actually get an average, like for 2003 January EMEA should give me 95%.
I believe, depending on which level i am rolling up at the moment i should devide the sum by the number of members (ow what ever it is called) in that level. So on region level the sum of EMEA should be devided by 2 and the sum of LATAM should be devided by 3. ANd on total level i should devide by 5.
So my question eventually would be, how can i get this. I don't know how to get the 'count' of members of each level. Keep getting syntax errors but don't know what is wrong. (So less documentation about MDX)

Hope this example is more clearer.

Thnx.

Stanley

"alex" wrote:

Quote:
hi,

create a calculated member
named max
in the value xpression give it as 1/100 * 100

and now create another calculated member and in the value
xpression give an iif condition like

IIF([Measures].[Upper Control]>[Measures].[Max],[Measures].
[Max],[Measures].[Mean])

did i make my self clear ??

bye
-----Original Message-----
Hi,

i think this could be a challenge. I haven't found
anything yet (that helped) to resolve this.
I have the following:
2003:
January 100%
February 100%
March 100%
.....
2004:
January 100%
February 100%
March 100%
......

When rolling up, 2003 will get a total of 300% and 2004
will also be 300%. On higher level even 600%. Well,
because the 'maximum' is 'always' 100%. I want to show on
every row 100%, no matter if on month level, year level
and top level.
There is also a region dimension involved.
How can i achieve this? I've tried it with Calculated
Cells, but no results.

Thanks in advance.

Stan
.



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.