Calculated Fields based on the Output of another field

  • Hi,

    I am trying to produce a matrix report that does some calculations of the length taken between two dates.

    I have a Description and a Start Date field. I basically want to work out the length of time between the date where the Description is Responded and the Description if issued.

    I have tried to create two Calculated fields to do this

    1. =IIF(Fields!Description.Value = "Responded",Fields!Start.Value,"") so the date would only be shown if the Description is Responded

    2. =IIF(Fields!Description.Value ="Issued",Fields!Start.Value,"") so the date would only be shown if the Description is Issued

    I then did a DateDiff calculation on the two fields but the report gave and error

    "Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'"

    I'm assuming it's because I need another Date rather than a blank returned in the False part of the argument but not sure of a way around for it

    Can anyone think of a better way of achieving the desired results?

    Using Report Builder 3.0 (2012)

    Thanks

  • It would help to see the DateDiff calculation.

    My first thought is to try putting a zero instead of "" for the false part of the statement.

  • thanks Sarah

    That seems to have sorted it

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply