dbTalk Databases Forums  

SSAS 2005: Total with calculated cells

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


Discuss SSAS 2005: Total with calculated cells in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
g4rc@telenet.be
 
Posts: n/a

Default SSAS 2005: Total with calculated cells - 11-24-2005 , 04:32 AM






Hello

I have a problem with totals

I have the following dimension

-Turnover 700
----Software 100
----Hardware 150
----Other 200
----Other total 250


The other total is a calculated cell where I make a sum of Software and
Hardware, This works fine in the cube

But the total of turnover is 700, this is wrong and must be 450
(Software + Hardware + Other)

In SSAS 2000 he does this correct
So my question is , how to exclude the calculated cell in the total of
the parent

Anyone an idea ?

Thx


Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-25-2005 , 12:22 AM






If you defined "Other total" as a real member with a custom rollup
formula, you could then also add a unary operator column and use the
"~" unary operator to stop it from adding up into Turnover.

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

In article <1132828339.114153.127920 (AT) g43g2000cwa (DOT) googlegroups.com>,
g4rc (AT) telenet (DOT) be says...
Quote:
Hello

I have a problem with totals

I have the following dimension

-Turnover 700
----Software 100
----Hardware 150
----Other 200
----Other total 250


The other total is a calculated cell where I make a sum of Software and
Hardware, This works fine in the cube

But the total of turnover is 700, this is wrong and must be 450
(Software + Hardware + Other)

In SSAS 2000 he does this correct
So my question is , how to exclude the calculated cell in the total of
the parent

Anyone an idea ?

Thx



Reply With Quote
  #3  
Old   
g4rc@telenet.be
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-25-2005 , 04:50 AM



Darren

"Other total" is a real member, but has no custom rollup
Its a calculated cell

What do you mean by the unary operator '~'

Thx


Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-25-2005 , 08:54 PM



Unary operators control how each member aggregates up to it's parent.

Possible unary operators are:

+ The value of the member is added to the aggregate value of the
preceding sibling members.

- The value of the member is subtracted from the aggregate value of the
preceding sibling members.

* The value of the member is multiplied by the aggregate value of the
preceding sibling members.

/ The value of the member is divided by the aggregate value of the
preceding sibling members.

~ The value of the member is ignored.

Note: The above was taken straight from books online

To set your own unary operator, add a column to your dimension table. I
would recommend adding the new column, updating all the rows to '+',
setting the default value to '+' and then setting the column to not
nullable. This way you don't have to worry about this column as new
values are added and you just set the value on an exception basis.

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

In article <1132915834.515551.85020 (AT) g14g2000cwa (DOT) googlegroups.com>,
g4rc (AT) telenet (DOT) be says...
Quote:
Darren

"Other total" is a real member, but has no custom rollup
Its a calculated cell

What do you mean by the unary operator '~'

Thx



Reply With Quote
  #5  
Old   
g4rc@telenet.be
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 12:40 AM



Darren

do you know if this is also so in SQL 2000

I think not

thx


Reply With Quote
  #6  
Old   
MC
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 01:13 AM



Yes, this actually exists (and works ) in AS 2000


MC

<g4rc (AT) telenet (DOT) be> wrote

Quote:
Darren

do you know if this is also so in SQL 2000

I think not

thx




Reply With Quote
  #7  
Old   
g4rc@telenet.be
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 01:22 AM



In know

but I mean the following

In SSAS 2000 I have the same dimension and i have no unary operator
defined.
And then the data of the calculated cells are not agregated in the
totals

Greetz


Reply With Quote
  #8  
Old   
g4rc@telenet.be
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 01:53 AM



This are the mdx statements for a calculated cell in SSAS 2000

Calculation subcube = {[AccountCataloguesTree].&[254]}
Calculation value =
[AccountCataloguesTree].&[251]+[AccountCataloguesTree].&[252]+[AccountCataloguesTree].&[253]

This is the mdx statement for the same calculated cell in SSAS 2005

CREATE CELL CALCULATION CURRENTCUBE.[Revenue Recurring Activities 2006]
FOR '({[AccountCataloguesTree].[Parent Key].&[254]})' AS
'[AccountCataloguesTree].[Parent
Key].&[251]+[AccountCataloguesTree].[Parent
Key].&[252]+[AccountCataloguesTree].[Parent Key].&[253]'


Reply With Quote
  #9  
Old   
MC
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 01:56 AM



If I understand, calculated measure is behaving differently in 2005? Could
you post a MDX you used for this calculated measure?

MC


<g4rc (AT) telenet (DOT) be> wrote

Quote:
In know

but I mean the following

In SSAS 2000 I have the same dimension and i have no unary operator
defined.
And then the data of the calculated cells are not agregated in the
totals

Greetz




Reply With Quote
  #10  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: SSAS 2005: Total with calculated cells - 11-28-2005 , 03:49 AM



I have not played with calculated cells in AS2005 yet, so I am not sure
exactly how they differ to AS2k. One question though, do you have a
CALCULATE; statement after your CREATE CELL CALCULATION... ? I believe
this would force the hierarchy to reaggregate including the cell
calculation value.

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

In article <1133164418.447552.225180 (AT) z14g2000cwz (DOT) googlegroups.com>,
g4rc (AT) telenet (DOT) be says...
Quote:
This are the mdx statements for a calculated cell in SSAS 2000

Calculation subcube = {[AccountCataloguesTree].&[254]}
Calculation value =
[AccountCataloguesTree].&[251]+[AccountCataloguesTree].&[252]+[AccountCataloguesTree].&[253]

This is the mdx statement for the same calculated cell in SSAS 2005

CREATE CELL CALCULATION CURRENTCUBE.[Revenue Recurring Activities 2006]
FOR '({[AccountCataloguesTree].[Parent Key].&[254]})' AS
'[AccountCataloguesTree].[Parent
Key].&[251]+[AccountCataloguesTree].[Parent
Key].&[252]+[AccountCataloguesTree].[Parent Key].&[253]'




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.