Lookup Function. Have you tried it?

  • Hi geniuses!

    I'm stuck here with a Lookup function in SSRS.

    Can anybody give me an example of this function?

    Thanks

    Best Regards to all!

  • davdam8 (10/2/2012)


    Hi geniuses!

    I'm stuck here with a Lookup function in SSRS.

    Can anybody give me an example of this function?

    See if this helps: http://technet.microsoft.com/en-us/library/ee210531.aspx

    HTH,

    Rob

  • Hi!

    I believe that I've used correctly the Lookup function, but it doesn't retrieve the correct result.

    Going to be hard to explain, but here it goes:

    DataSet1 (from DataSource1) with ProjectName, from table: MSP.PROJECT (contains PROJ_UID, ProjectName,...)

    DataSet2 (from DataSource2) with StageName, from view: MSP.WORKFLOWSTATUS (contains PROJ_UID, STAGE_UID, StageName,...)

    Result sample:

    from DataSet1

    PROJECT NAME

    Proj A

    Proj B

    Proj C

    from DataSet2

    STAGE NAME

    Proposal in Consideration

    Waiting for Validation

    Selection

    In Execution

    ...

    In a cell from my tablix I got this expression:

    =Lookup(Fields!PROJ_UID.Value,Fields!PROJ_UID.Value,Fields!StageName.Value, "DataSet2")

    (basically I want to expose the stage of the project)

    Knowing that:

    Proj A is in Stage Name "Proposal in Consideration"

    Proj B is in Stage Name "Waiting for Validation"

    Proj C is in Stage Name "Selection"

    ... the result I got, for each one of the project, Stage Name = "Proposal in Consideration"

    Any solution/explanation?

    Big Thanks

    Best Regards

  • Rather than using the Lookup() function, can you join the tables in your SELECT?

    Rob

  • Hi,

    Go to this link look up explained with example

    http://www.bi-rootdata.com/2012/10/lookup-function-in-ssrs.html

Viewing 5 posts - 1 through 4 (of 4 total)

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