I have a table like :
ColumnA | ColumnB |
---|---|
8.75 | J |
5.05 | T |
6.1 | T |
8.5 | J |
I want to sum ColumnA data where ColumnB = J and show it in one of the RDLC textboxes.
What I should write in the Expression Field?
I have a table like :
ColumnA | ColumnB |
---|---|
8.75 | J |
5.05 | T |
6.1 | T |
8.5 | J |
I want to sum ColumnA data where ColumnB = J and show it in one of the RDLC textboxes.
What I should write in the Expression Field?
You can use the following expression.
=Sum(IIf(Fields!ColumnB.Value, 1) = "J", CDbl(Fields!ColumnA.Value), 0)
Use IIF( expr truepart,falsepart)
to determine if the value is J, and Sum()
to calculate the sum.