Lookup Function RRS feed

  • Question

  • I am returning my data from the lookup function

    =Lookup(Fields!Account_Number.Value,Fields!Account_Number.Value, Fields!Answer_Text.Value, "AssessmentAns2") & vbcrlf

    The query has 5 possible answers:

    1. 100K + Overall Spending

    2. 5+ Admits

    3. 7+ ED Visits

    4. Nurse Assessment after 10 Day LOS

    5. Physician Referral

    I would like to display all answers selected

    Using the above lookup function it only displays 1 answer

    What am I doing wrong?

    Any help wouldbe much appreciated


    Friday, June 19, 2015 2:31 PM


  • Hi MLOG,

    Based on my understanding, you are using the Lookup() function to return data. The [Answer_Text] field contains five records, but the Lookup() function only return one record, right?

    In Reporting Services, Lookup() function is used for retrieving the value from the specified dataset for a name/value pair where there is a 1-to-1 relationship. In your scenario, the syntax of the Lookup() function is right. Since you mention it only return one record, please compare the returned results in those two datasets, check if only one record meet the condition.

    Lookup Function (Report Builder and SSRS)

    If you have any question, please feel free to ask.

    Best regards,
    Qiuyun Yu

    Qiuyun Yu
    TechNet Community Support

    Tuesday, June 23, 2015 11:11 AM