dbTalk Databases Forums  

Custom Aggregate

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


Discuss Custom Aggregate in the microsoft.public.sqlserver.olap forum.



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

Default Custom Aggregate - 05-24-2006 , 10:05 PM






Hi,

I need to aggregate absolute value on each dimension member on a dimemsnion
level. Here is the sample data.

L1 = 200
L1 = 400
L1 = -300
L2 = 100
L2 = -300
......

The standard SUM aggregation issue here is 100 (200+400-300+100-300). But I
don't want to sum them up directly. Instead, I need to sum absolute value of
L1 and L2 individually. The right calculation is below and the value should
be 500.

L1 = 200 + 400 - 300 = 300
L2 = 100 + (-300) = -200 * -1 = 200

==> L1 + L2 = 500 (300 + 200)

Can someone suggest me how to do that in AS function or in MDX calculated
members? Thanks.

-Charles

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.