0

So i am trying to sum columns based on a condition from one group to another.

The first column is the expression that counts how many Meters are in that group by company.

in the photo it shows eight by that company that have a value of meter,

Then to the right is invoice amount

What i need to do is a conditional format for the expression that says if x company has 8 meters what is the total amount for all invoices that = meter.

I have tried a few ways but unable to get the count out of the expression under the column so i know it has something to do with my condition statement and not sure wher it is going wrong any help would be appreciated

=Sum(IIf(Fields!invoiceclass.Value = "METER" and Fields!companyname.Value, Fields!invoiceamount.Value , Nothing), "AR")

enter image description here

SS_DBA
  • 2,403
  • 1
  • 11
  • 15
Kadmiel
  • 1
  • 2

1 Answers1

0

Try using:

=Sum(IIf(Fields!invoiceclass.Value = "METER", Fields!invoiceamount.Value,0))

I think you don't need to specify a scope since you want the sum be calculated per instance in the company group and you are using the expression in a cell inside the Company group scope.

Let me know if this helps.

alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48