0

This is what the error looks like

error

I'm trying to accomplish is to subtract sales from inventory then add transfers. When transfers evaluates to zero I am getting the error.

I'm new to SSRS so I have kind of hacked this together so far. I am pulling data from two datasets using lookup function. So the Transfers column is an expression calculated like so:

=IIF(ISNOTHING(Lookup(Fields!Date.Value, Fields!Date.Value, Fields!QUAN.Value, "DataSet3")),0,Lookup(Fields!Date.Value, Fields!Date.Value, Fields!QUAN.Value, "DataSet3"))

Which is working perfectly as I want it to. Then my running total (resulting inventory) code is:

=RunningValue(Fields!Sales_per_day.Value*-1 + (IIF(ISNOTHING(Lookup(Fields!Date.Value, Fields!Date.Value, Fields!QUAN.Value, "DataSet3")),0,Lookup(Fields!Date.Value, Fields!Date.Value, Fields!QUAN.Value, "DataSet3"))), Sum, Nothing) + Parameters!Balance.Value

So, essentially, I am recreating the lookup and doing the calculations as if the transfers column doesn't even exist (separate problem perhaps, because I don't know how to refer to the resulting expression from another column). As soon as I hit a zero value though, boom, #ERROR.

ANy help appreciated. Thanks!

escapeclaws
  • 65
  • 10

1 Answers1

0

I would refer to the resulting expression from another column by using the following method:

first identify the name of the column containing the value from the expression you wish to reference by going into property settings ie "Transfers"

second insert a column and in the expression field type in: =reportitems!Transfers.Value

SuperSimmer 44
  • 964
  • 2
  • 7
  • 12