0

Using SQL Server 2014, I have SSRS report with matrix inside. Problem: difference between 2 negative numbers doesn't give sum

The expression of field is:

= ReportItems!Textbox1.value - ReportItems!Textbox2.value

In report it looks like:

 Textbox1  | Textbox2 | Expression result |  
 ------------------------------------------
    -73    |   -170   |       -97         | 

So i have result -97 instead of 97. How I can fix this problem?

Dmitry
  • 305
  • 5
  • 21

1 Answers1

0

that is weird i tied table, matrix and text boxes all seem to work fine. i'm using ssrs 2012 though.

you could try something like

=(ReportItems!Textbox1.Value - ReportItems!Textbox2.Value) * iif( ReportItems!Textbox1.Value > ReportItems!Textbox2.Value,1,-1)
Kostya
  • 1,567
  • 1
  • 9
  • 15