Conditional Sum of a field in SSRS VS2005
hi,Ihave to Add Grouping on RDLC based on Some condition. I want to Sum The Amount based on Some Condition. Like if Entry Type(Column Name) is equal to A,B Or C then need Notto Sum the Amount else SumThe Amount.Mahesh
January 14th, 2009 3:35pm

try this,=IIF( Fields!EntryType.Value ="A" OR Fields!EntryType.Value ="B" OR Fields!EntryType.Value ="C", Fields!UnitPrice.Value, SUM(Fields!Price.Value))Rajesh Jonnalagadda http://www.ggktech.com
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2009 3:56pm

Thanks For Reply. But My Exact Q. is Given BlowTable StructureSNo Entry Type Amount1A1002B503A2004C1905B 506D1007E508D100OutPut I Want Thru ReportSNo EntryTypeAmount1A1002A2003B504B 505 C1906D1007D100 Total D 2008E50TotalE50And so on.......... Except A,B,C I Need Sum of All Entry TypeMahesh
January 14th, 2009 5:02pm

try this,Open Table Properties --> Click on Groups tab-->Click ADD--> Place this expression =IIF( Fields!EntryType.Value ="A" OR Fields!EntryType.Value ="B" OR Fields!EntryType.Value ="C", "", Fields!EntryType.Value ) in Expression --> Select "Include Group Footer" checkbox --> Click Ok --> Click Ok --> Enter Fields!EntryType.Value and Fields!Price.Value field in Detail row -->in group footer enter =SUM(Fields!Price).Value) --> Select Group Footer row and right click --> click on Properties --> Visibility --> In Hidden Textbox place =IIF( Fields!EntryType.Value ="A" OR Fields!EntryType.Value ="B" OR Fields!EntryType.Value ="C", True,False)Rajesh Jonnalagadda http://www.ggktech.com
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2009 5:52pm

Thanks a lotMahesh
January 15th, 2009 7:37am

Nice article. I need help on something similar. I have group footer which has total. But I have to display the footer only when that group has more than one record. Is there a way to do that? Thanks, Vijay
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 10:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics