Forum Discussion

visitprateek's avatar
visitprateek
Frequent Visitor
6 years ago
Solved

Replacing part data in a table in another table

Hello I want to replace some values in table 1 of table 2 depending on the invoice no. for example; Table 1 Invoice date Invoice No. Amount 01-01-2020 GOOD-01 100 02-02-...
  • sanimesa's avatar
    6 years ago

    visitprateekYou can use LOOKUPVALUE to retrieve the revised invoice number and amount, if any available to build columns in the first table. Then use the new columns in your visuals.

     

    For example:

    Invoice No New = LOOKUPVALUE(Table2[New bill No.], Table2[Original invoice number.], Table1[Invoice No.])
    Invoice No Final = IF(ISBLANK(Table1[Invoice No New]), Table1[Invoice No.], Table1[Invoice No New])
    Amount New = LOOKUPVALUE(Table2[Revised amount], Table2[Original invoice number.], Table1[Invoice No.])
    Amount Final = IF(ISBLANK(Table1[Amount New]), Table1[Amount], Table1[Amount New])