Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Analysis Services (2000)
 how to Force / avoid certain aggregations ?

Author  Topic 

Player1005
Starting Member

4 Posts

Posted - 2004-04-30 : 07:28:58

How can I avoid certain aggregations?

I have a fact with:

transactionID employeeID Flag Value
1 w 0 100
1 x 0 100
1 y 0 100
1 z 1 100
2 x 0 200
2 z 1 200



How can I force that only the values where flag = 1 are aggregated?

Thx for help!

Pl1005

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-04-30 : 09:11:26
SUM(CASE WHEN Flag=1 THEN Value ELSE 0 END) as Total


- Jeff
Go to Top of Page
   

- Advertisement -