Click here to Skip to main content
15,562,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

Am trying sum the true value of below condition in SSRS Report .

=sum(iif(Fields!schqty.Value - Fields!RAF.Value =0 ,1,0))

Am getting output value only for last record.

Kindly advise if i am doing anything wrong in report .


What I have tried:

=sum(iif(Fields!schqty.Value - Fields!RAF.Value =0 ,1,0))
Updated 19-Nov-20 19:00pm

1 solution

It's quite sometime for me I worked on SSRS but AFAIR, SUM is an aggregate function and would need a group or data region defined.

Expression Examples (Report Builder) - SQL Server Reporting Services (SSRS) | Microsoft Docs[^]

The Sum function can total the values in a group or data region. This function can be useful in the header or footer of a group.

Try placing your expression in a group header and see. You have to play with it a little and see how it behaves and work. Would be difficult to exactly help with design part of report online.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900