dbTalk Databases Forums  

Aggregation type

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


Discuss Aggregation type in the microsoft.public.sqlserver.olap forum.



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

Default Aggregation type - 11-24-2003 , 05:16 PM






Hi,
To keep things simple, let me eliminate all extraneous details and
focus on the problem:

I have three measures:
Time: date_time
Point: point_id, name
Unit: unit_id, type -> type can be one of the following "SUM", "MAX",
"MIN"

The fact table has the following columns:
date_time
point_id,
unit_id,
value

The question I have is following:
Can I aggregate value in the fact table in such a way that
if unit.type is "SUM" then I sum, if unit.type is "MAX" then use MAX
when unit.type is "MIN" use MIN.

I appreciate any feedback

Koichiro

Reply With Quote
  #2  
Old   
Sasha Berger
 
Posts: n/a

Default Re: Aggregation type - 11-25-2003 , 09:01 PM






Hi
Create 3 measures: Min, Max and Sum.
Create dimension Type.
Create culculated measure which will show one of real masure base on
selected member of dimension Type.
Sasha

"Koichiro" <koichiro (AT) sbcglobal (DOT) net> wrote

Quote:
Hi,
To keep things simple, let me eliminate all extraneous details and
focus on the problem:

I have three measures:
Time: date_time
Point: point_id, name
Unit: unit_id, type -> type can be one of the following "SUM", "MAX",
"MIN"

The fact table has the following columns:
date_time
point_id,
unit_id,
value

The question I have is following:
Can I aggregate value in the fact table in such a way that
if unit.type is "SUM" then I sum, if unit.type is "MAX" then use MAX
when unit.type is "MIN" use MIN.

I appreciate any feedback

Koichiro



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.