Sebastian
Sebastian

Reputation: 5

SSRS Lookup function of two columns within the same dataset

I need an SSRS Lookup query to get results from Dataset 2 Column1 and if not found in Column1 lookup Column2.

Dataset1 - WONUMBER

Dataset2 - WONUMBER, Column1, Column2

Upvotes: 0

Views: 410

Answers (1)

Alan Schofield
Alan Schofield

Reputation: 21748

You can just use an IIF() in your return argument of the LOOKUP function like this

=LOOKUP(Fields!WONUMBER.Value,
        Fields!WONUMBER.Value, 
        IIF(Fields!Column1.Value=Nothing,Fields!Column2.Value,Fields!Column1.Value),
        "DataSet2"
       )

Upvotes: 0

Related Questions