dbTalk Databases Forums  

AS2005 Different aggregate functions depending on dimension

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


Discuss AS2005 Different aggregate functions depending on dimension in the microsoft.public.sqlserver.olap forum.



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

Default AS2005 Different aggregate functions depending on dimension - 11-24-2005 , 04:05 PM






In AS2005 is it possible to set up different aggregate functions depending on
dimension?

E.g. with a balance measure.

For all dimensions except time use Sum as the aggregate function.
For Time use LastChild as the Aggregate function.

e.g. Sum across customers, divisions, etc.
For Time: Months take the last fortnight in the month, Years take the last
month in the year.

Thanks

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

Default Re: AS2005 Different aggregate functions depending on dimension - 11-25-2005 , 12:49 AM






AS2005 has a number of these semi-additive aggregates built-in. When you
select a measure you can specify a number of extra aggregations, two
examples are LastChild and LastNonemptyChild.

If you look up "Measure and Measure Group Properties" in BOL it has more
details. I believe all the semi-additive measures do not aggregate over
time dimensions. (Note: It looks like there is an error in BOL as Count
is marked as semi-additive, when I it should be marked as Additive)

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

In article <37AFA32F-717A-41CB-A0E2-F58663FD2644 (AT) microsoft (DOT) com>,
acius (AT) nospam (DOT) nospam says...
Quote:
In AS2005 is it possible to set up different aggregate functions depending on
dimension?

E.g. with a balance measure.

For all dimensions except time use Sum as the aggregate function.
For Time use LastChild as the Aggregate function.

e.g. Sum across customers, divisions, etc.
For Time: Months take the last fortnight in the month, Years take the last
month in the year.

Thanks



Reply With Quote
  #3  
Old   
Acius
 
Posts: n/a

Default Re: AS2005 Different aggregate functions depending on dimension - 11-28-2005 , 03:39 PM



Thanks Darren,

Didin't click that LastChild and LastNonemptyChild only applied to time.

Much simpler than using CustomRollupColumn in the time dimension with MDX to
test for the appropriate measure

Cheers

"Darren Gosbell" wrote:

Quote:
AS2005 has a number of these semi-additive aggregates built-in. When you
select a measure you can specify a number of extra aggregations, two
examples are LastChild and LastNonemptyChild.

If you look up "Measure and Measure Group Properties" in BOL it has more
details. I believe all the semi-additive measures do not aggregate over
time dimensions. (Note: It looks like there is an error in BOL as Count
is marked as semi-additive, when I it should be marked as Additive)

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

In article <37AFA32F-717A-41CB-A0E2-F58663FD2644 (AT) microsoft (DOT) com>,
acius (AT) nospam (DOT) nospam says...
In AS2005 is it possible to set up different aggregate functions depending on
dimension?

E.g. with a balance measure.

For all dimensions except time use Sum as the aggregate function.
For Time use LastChild as the Aggregate function.

e.g. Sum across customers, divisions, etc.
For Time: Months take the last fortnight in the month, Years take the last
month in the year.

Thanks




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.