Georges Sabbagh
Georges Sabbagh

Reputation: 279

sum 2 columns in a reporting services matrix

I have matrix in my report having column field "Layer Origin".

Layer Origin has 3 values:

  1. New Business
  2. Renewal - Rewritten
  3. Renewal - Same Terms

if i run the report as is it will show Totals for each of the 3 above.

What i what is to show the Totals for:

  1. New Business
  2. Renewal (Renewal - Rewritten + Renewal - Same Terms)

i.e.: i want to sum the values of Renewal-Rewritten and Renewal- Same Terms Below is a screen shot to illustrate my request.

enter image description here


Thanks for your reply. ive tried the below code but it gave me error (see the below screen)

=SUM(IIF(Fields!Layer_Origin.Value="New Business",0,Fields!USD_Cedent_Premium.Value))

enter image description here

I appreciate your feedback.

Upvotes: 1

Views: 4469

Answers (2)

Georges Sabbagh
Georges Sabbagh

Reputation: 279

After Several testing i found the problem. the code should be as below:

=SUM(IIF(Fields!Layer_Origin.Value="New Business",CDec(0.00),Fields!USD_Cedent_Premium.Value))

Thanks for your assistance

Upvotes: 0

Pratik
Pratik

Reputation: 1512

This situation can be handle if you just use conditional SUM in Total Column

=SUM(IIF(Fields!Layer_Origin.Value="New Business",0,Fields!USD_CED.Value))

Instead of using

=SUM(Fields!USD_CED.Value)

I think it will solve your problem. Pardon me if some spell mistake or syntax error. As i dont have any VS intalled to check. Share if you still face any issue bcz this one is definetly i can help.

Upvotes: 1

Related Questions