dbTalk Databases Forums  

Average without using descendants ?

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


Discuss Average without using descendants ? in the microsoft.public.sqlserver.olap forum.



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

Default Average without using descendants ? - 02-09-2006 , 02:39 AM






Hi all,

I have a cube with a certain Measure called "Bruto Price 30s" (i think the
name explains the content). when users select (in the pivot table) months on
the rows, and channels on the columns, they want to see the average bruto
price. Therefore, i created a calculated member with this formula :

sum({[Bruto Price 30s]}) / count({[Bruto Price 30s]},ExcludeEmpty)

Unfortunately, this gives the same result as the sum of [Bruto Price 30s].
Has anyone got an idea why its still using its sum ?

Thanks!

PS: the avg([Measures].[Bruto Price 30s]) function didn't work either

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

Default RE: Average without using descendants ? - 02-09-2006 , 11:55 AM






You might want to specify the set that you want to avg against. Something
like:
Avg({[Month]}, [Your measure]).

"Koen" wrote:

Quote:
Hi all,

I have a cube with a certain Measure called "Bruto Price 30s" (i think the
name explains the content). when users select (in the pivot table) months on
the rows, and channels on the columns, they want to see the average bruto
price. Therefore, i created a calculated member with this formula :

sum({[Bruto Price 30s]}) / count({[Bruto Price 30s]},ExcludeEmpty)

Unfortunately, this gives the same result as the sum of [Bruto Price 30s].
Has anyone got an idea why its still using its sum ?

Thanks!

PS: the avg([Measures].[Bruto Price 30s]) function didn't work either

Reply With Quote
  #3  
Old   
 
Posts: n/a

Default RE: Average without using descendants ? - 02-11-2006 , 03:20 AM



You could also try creating a real count measure in your cube, that way
you would not have to dynamically count descendants at runtime.

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

In article <FEB69D24-9F58-494F-9B54-575491E10FE9 (AT) microsoft (DOT) com>,
yongli (AT) discussions (DOT) microsoft.com says...
Quote:
You might want to specify the set that you want to avg against. Something
like:
Avg({[Month]}, [Your measure]).

"Koen" wrote:

Hi all,

I have a cube with a certain Measure called "Bruto Price 30s" (i think the
name explains the content). when users select (in the pivot table) months on
the rows, and channels on the columns, they want to see the average bruto
price. Therefore, i created a calculated member with this formula :

sum({[Bruto Price 30s]}) / count({[Bruto Price 30s]},ExcludeEmpty)

Unfortunately, this gives the same result as the sum of [Bruto Price 30s].
Has anyone got an idea why its still using its sum ?

Thanks!

PS: the avg([Measures].[Bruto Price 30s]) function didn't work either


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

Default RE: Average without using descendants ? - 02-11-2006 , 07:37 AM



Darren, i used your solution. I created the member and set it to invisible.
THanks to everyone for their assistence!

Greetz, K

"Darren Gosbell" wrote:

Quote:
You could also try creating a real count measure in your cube, that way
you would not have to dynamically count descendants at runtime.

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

In article <FEB69D24-9F58-494F-9B54-575491E10FE9 (AT) microsoft (DOT) com>,
yongli (AT) discussions (DOT) microsoft.com says...
You might want to specify the set that you want to avg against. Something
like:
Avg({[Month]}, [Your measure]).

"Koen" wrote:

Hi all,

I have a cube with a certain Measure called "Bruto Price 30s" (i think the
name explains the content). when users select (in the pivot table) months on
the rows, and channels on the columns, they want to see the average bruto
price. Therefore, i created a calculated member with this formula :

sum({[Bruto Price 30s]}) / count({[Bruto Price 30s]},ExcludeEmpty)

Unfortunately, this gives the same result as the sum of [Bruto Price 30s].
Has anyone got an idea why its still using its sum ?

Thanks!

PS: the avg([Measures].[Bruto Price 30s]) function didn't work either



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.