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
 General SQL Server Forums
 New to SQL Server Programming
 SSRS 2005 - Sum if a particular field falls into s

Author  Topic 

scottydogg84
Starting Member

5 Posts

Posted - 2011-09-14 : 06:15:09
Hi all,

I am very new to reporting services.

I have a report like the one below with 6 columns:

Name Bills Disbs WIP Exposure Client
Smith 5,000 1,000 1,000 7,000 500
Jones 10,000 5,000 5,000 20,000 1,500
Roberts 12,000 6,000 3,000 21,000 750
Beckham 15,000 5,000 20,000 40,000 1,000
Exp >25k 15,000 5,000 20,000 40,000 1,000
Exp <25k>10k 22,000 11,000 8,000 41,000 2,250
Exp <10k 5,000 1,000 1,000 7,000 500


What i am trying to acheive is the several subtotals.

Basically i need to total each column based on the Exposure value. For example, if the Exposure value is less than 10,000 i want to only total each column if the Exposure meets this criteria. Likewise, if the Exposure value is over 25,000 i want a seperate subtotal for these entries.

As an example, I have tried using the following expression but it does not work:

=Iif(Fields!Exposure.Value<10000, SUM(Fields!Disbs.Value),0)

I would be grateful for any help on this.

Thanks in advanced.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-14 : 08:53:54
you just need to add three rows in your group/table footer and add aggregate expression based on IIF inside

something like

SUM(IIF(Fields!Exposure.Value>25000,Fields!Exposure.Value,0)) etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -