Bishoy Ezzat
Bishoy Ezzat

Reputation: 99

how to sum after iff condition in ssrs?

I want to sum all the values of the column, using if condition same as the column expression:-

The Expression of the normal column:-

iif(Fields!mcount.Value <> 0 And Fields!TaxCode.Value = 1 ,Fields!InputAmnt.Value,0)

The Expression to sum, I used 2 codes and the same result "#Error" appeared in both cases

sum(iif(Fields!mcount.Value <> 0 And Fields!TaxCode.Value = 1 ,Fields!InputAmnt.Value,0))

and

 iif(Fields!mcount.Value <> 0 And Fields!TaxCode.Value = 1 ,sum(Fields!InputAmnt.Value),0) 

any help ?

Upvotes: 0

Views: 1938

Answers (1)

Aldrin
Aldrin

Reputation: 766

Try adding VAL from the InputAmnt field. See below expression.

=SUM(iif(Fields!mcount.Value <> 0 And Fields!TaxCode.Value = 1 ,VAL(Fields!InputAmnt.Value),0))

Upvotes: 1

Related Questions