dbTalk Databases Forums  

calculated members

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


Discuss calculated members in the microsoft.public.sqlserver.olap forum.



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

Default calculated members - 08-29-2005 , 04:37 AM






This is my situation in cube editor:



contry1-region11-total11
-region12-total12
-region13-total13
contry2-region21-total21
-region22-total32
contry3-region31-total31
-region32-total32

How can I create a calculated member that displays for each country the
value : sum of totals divided sum of distinct regions in that country?
For example : (total11+ total12 + total23) /3
(total21+ total22) /2



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: calculated members - 08-29-2005 , 09:33 AM






This Foodmart query should help:

with member Measures.TotalPerChild as ' (store.currentmember,[Unit Sales]) /
iif( store.currentmember.children.count
=0,1,store.currentmember.children.count) '
select
{[Measures].[Unit Sales] ,Measures.TotalPerChild } on columns,
non empty store.members on rows
from Sales

HTH,
--
Brian Altmann
BI Specialist
Huddle Group S.A (www.huddle.com.ar)
www.geocities.com/brianaltmann/olap.html


"simone damelia" wrote:

Quote:
This is my situation in cube editor:



contry1-region11-total11
-region12-total12
-region13-total13
contry2-region21-total21
-region22-total32
contry3-region31-total31
-region32-total32

How can I create a calculated member that displays for each country the
value : sum of totals divided sum of distinct regions in that country?
For example : (total11+ total12 + total23) /3
(total21+ total22) /2



*** Sent via Developersdex http://www.developersdex.com ***


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.