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 2005 Forums
 Analysis Server and Reporting Services (2005)
 Sum 2 specific values from 1 group

Author  Topic 

bcwhiteh
Starting Member

2 Posts

Posted - 2010-01-27 : 10:51:46
I'm working in SSRS, and lets say I have a matrix, and the matrix is grouped by "Customers", and "Customers" have values: "Bob", "Bill", "Ted". Each Customer has a field "Amount".

If I sum the "Amount" in the group footer, it will give me the sum for "Bob", "Bill", and "Ted". If I sum in the report footer it will give me the sum for all of "Bob", "Bill", and "Ted".

But lets say I only wanted the sum for "Bob" and "Ted, and not for "Bill". How can I filter the sum to include only specific values of the group?

bcwhiteh
Starting Member

2 Posts

Posted - 2010-01-27 : 10:57:52
Sorry, I meant my last line to say,

"But lets say I only wanted the sum for "Bob" + "Ted, and not for "Bill". How can I filter the sum to include only specific values of the group?"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-01-27 : 11:56:08
by using an expression. something like

=SUM(IIF(Fields!Customer.Value != "Bill", Fields!Amount.Value,0))
in report footer
Go to Top of Page
   

- Advertisement -