Forum Discussion

dnsia's avatar
dnsia
Helper II
5 years ago
Solved

How to insert rows from another table based on criteria.

Hi all, Please help. I have 2 tables. I need to insert data rows in table 1 from table 2 based on conditions. If table 2 has the same [BL No], [EQPID], [Vessel], [Voyage], [Bound] then it sh...
  • Anonymous's avatar
    Anonymous
    5 years ago

    dnsia 

    This should be much easier if you just create a new table using DAX, you can add additional conditions for all columns ([BL No], [EQPID], [Vessel], [Voyage], [Bound]) with && Not in values() combination. See pbix if needed.

     

    New Table =
    var notintable = CALCULATETABLE('Table (2)',FILTER('Table (2)',NOT([BL No] in VALUES('Table'[BL No])) && NOT([EQPID] in VALUES('Table'[EQPID]))))
    Return UNION('Table',notintable)
     

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.