bigtri
bigtri

Reputation: 5

SSRS - Sum a column that gets its value from an IIF expression

In SSRS, how would I sum a column that gets it's value from an expression? For example...

Field1  |  Field2  |  Computed Field
------  |  ------  |  --------------
10      |  20      |  100 *IIF(Fields!Field1.Value > Fields!Field2.Value, 0, 100)*
40      |  20      |  0   *IIF(Fields!Field1.Value > Fields!Field2.Value, 0, 100)*
50      |  20      |  0   *IIF(Fields!Field1.Value > Fields!Field2.Value, 0, 100)*
------     ------     ---------------------
                      HOW DO I GET THETOTAL?
                      OF THIS COMPUTED FIELD

Things I've tried:

Thanks in advance for any help you can give!

Upvotes: 0

Views: 822

Answers (1)

SuperSimmer 44
SuperSimmer 44

Reputation: 999

You need to sum your expression and reference your dataset, for example:

=sum(IIF(Fields!Field1.Value > Fields!Field2.Value, 0, 100),"DataSet1")

Upvotes: 0

Related Questions