Reputation: 23
FormatCurrency(
(SUM(iif(IsNothing(Fields!Planned.Value),0,Fields!Planned.Value))-(SUM(iif(IsNothing(Fields!Actuals.Value),
iif(IsNothing(Fields!Forecasts.Value),0,Fields!Forecasts.Value),
iif(Fields!Actuals.Value=0,iif(IsNothing(Fields!Forecasts.Value),
0,
Fields!Forecasts.Value),Fields!Actuals.Value))))),
iif(Parameters!DecimalDigits.Value=1,1,iif(Parameters!DecimalDigits.Value=2,2,0)),0,0,0)
)
this is my expression which is returning negative values and how to remove this negative sign in front of the number
Upvotes: 1
Views: 9988
Reputation: 20560
The easiest way is to turn the expression around. For instance, if
Planned - Actual
is giving you negative numbers and you want positive numbers then maybe you want
Actual - Planned
Otherwise you could just take the whole expression away from zero to reverse the sign:
0 - <expression>
Or if you really want to kill the negative sign regardless, then use Absolute
- this returns the value as a positive number regardless
Abs(<expression>)
I would also remove the formatting part of the expression and put that into the Format
property. Almost everything in SSRS can be an expression, so you don't have to do everything in the Value
expression.
Upvotes: 8