Lookup do not bring amount

Ysa8989 41 Reputation points
2020-08-20T18:02:40.463+00:00

Hello

There I have to datasets one for expenses and one for revenues, it is partially working because the lookup is bringing one value from the datasource therefore I am out balance. The money is sitting there but my lookup is not bringing both amount just one,

Dataset 1 (expense acccount ) Dataset 2( revenue account)

0001 $550.00 0001 $550.00
0001 25.00

LOOKUP

=lookup(Fields!a_org_exp.Value & Fields!a_object_exp.Value, Fields!a_org_exp.Value & Fields!a_object_exp.Value, Fields!a_org.Value, "DataSet1")

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,935 questions
0 comments No comments
{count} votes

Accepted answer
  1. Joyzhao-MSFT 15,591 Reputation points
    2020-08-21T01:38:10.61+00:00

    Hi,
    Lookup function returns only one value from the destination dataset. So, I wonder want you mean by "bring both amount".
    Let's assume, in the tablix, you have Dataset1 in it. You could just drag and drop the amount value in the table , then use lookup to have the corespondent Dataset2 value in another column. So that both value would appear in the table.
    The expression should be :

    =lookup(Fields!ID.value, Fields!dataset2ID.Value, Fields!a_org.Value, "DataSet2")  
    

    =Lookup(source_expression, destination_expression, result_expression, dataset)

    Check the Lookup definition , see what is the logic for your case should be: Functions - Lookup Function

    Regards,
    Joy


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.