{{ transformations:KeepRemoveMatchingActionRemove.png}}{{ transformations:KeepRemoveMatchingAction.png}} ====== KEEP/REMOVE MATCHING ====== Category: Transform / Filters\\ \\ =====Description===== This action keeps or removes rows where values in the specified column are matching the specified column of another table.\\ \\ =====Use cases===== Finding the difference between two lists, or the overlapping records of two lists. Filtering a table to keep only records with a subset of values in a particular column. Finding new records that haven't been exported yet. \\ =====Action settings===== ^Setting ^Description ^ |Mode|Select whether values in the current dataset are kept or removed if they match values in the lookup table. Options: //Keep\\ matching (remove mismatching)// or //Remove matching (keep mismatching)//.| |Lookup table|Select the dataset containing the values to compare to.| |Matching columns|Select the columns in the current table and the lookup table to match values in. This option appears once the Lookup\\ table has been selected.| \\ =====Remarks===== This action is case-sensitive and will only match values with the same case. Values must be identical (equal) in order to be matched. If another matching mode is needed (e.g. "Starts with") use the [[transformations:match|Match]] action first to do the matching. The action's icon will change depending on the mode selected (keep/remove).\\ \\ =====Examples===== **Example:** Remove the European countries from the first table.\\ **Table 1:** Average income and deductions ^Country ^Gross income ^Disposable income ^Compulsory deductions ^ | United States | 56067| 45582|18.7% | | Ireland | 51218| 48073|6.14% | | Luxembourg | 55176| 47716|13.52% | | Australia | 51050| 42617|16.52% | | Switzerland | 53716| 48414|9.87% | | Canada | 45896| 37469|18.36% | \\ **Table 2:** Some European countries ^Country ^ |Ireland | |Luxembourg | |Switzerland | \\ **Action parameters:** > Mode is "Remove matching" > Matching values in table is "Table 2" > Column of the first table is "Country" > Column of the second table is "Country" \\ **Result table:** ^Country ^Gross income ^Disposable income ^Compulsory deductions ^ | United States | 56067| 45582|18.7% | | Australia | 51050| 42617|16.52% | | Canada | 45896| 37469|18.36% | \\ ====Community examples==== * [[https://community.easymorph.com/t//675/5|Compare two Excel sheets with EasyMorph]] ([[https://community.easymorph.com/uploads/short-url/xQLWtAogCqcMrglyfXLKmrAF7aR.morph|Project]]; Module: //Main//; Group: //Compare data//; Table: //Mismatching rows//;\\ Action position: //3//) * [[https://community.easymorph.com/t//2008/2|“Printed” Text File: Could EasyMorph import this?]] ([[https://community.easymorph.com/uploads/short-url/kIb1qqOJb9WK6D1N1jFZdnHzC46.morph|Project]]; Module: //Parse Group//; Group: //Tab 1//; Table: //Table 1//; Action position: //2//) \\ =====See also===== * [[transformations:match|Match]] * [[transformations:filter|Filter by condition]]