Home > Archive > MS SQL Server OLAP > August 2005 > calculated members









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 calculated members
simone damelia

2005-08-29, 7:23 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.droptable.com ***
Brian Altmann

2005-08-29, 11:23 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:

> 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.droptable.com ***
>

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