Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

lookup value from another table

Hi i got 2 table

 

table 1 'RECO GL DK SALE  table 2 RECO EAST DK SALE
       
Document No.Amount  Document No.Amountlookup from table 1 (this is what i want)
100150  100300270
100120  10015050
100150     

 

I wanna to do this

AMOUNT GL look reco = LOOKUPVALUE('RECO GL DK SALE'[Amount],'RECO GL DK SALE'[Document No.],'RECO EAST DK SALE'[Document No.])

 

but I got an error because in table 1 there are multiple line in tabel 1

A table of multiple values was supplied where a single value was expected.

 

how i can have the sum of these lines in table 1?

  • Anonymous Please try this as a "New Column" in your table 2

     

    LkpAmount = CALCULATE(SUM(Test124Lkp[Amount]),FILTER(Test124Lkp,Test124Data[DocumentNo]=Test124Lkp[DocumentNo]))

1 Reply

  • PattemManohar's avatar
    PattemManohar
    Icon for Community Champion rankCommunity Champion

    Anonymous Please try this as a "New Column" in your table 2

     

    LkpAmount = CALCULATE(SUM(Test124Lkp[Amount]),FILTER(Test124Lkp,Test124Data[DocumentNo]=Test124Lkp[DocumentNo]))