How To Use DESelect Segment
Step 2: Target Definition
How to use multiple fields as the unique field in deduplication?
scenario you want to deduplicate the records of a data extension as the unique field, you would like to include multiple fields note this scenario uses the feature https //support deselect com/hc/en us/articles/360017037338 this feature is only enabled for deselect advanced let's assume you have a data extension called orders , with the following records person product quote version date a car 1 1 5/1/2021 a car 1 2 5/2/2021 a car 2 1 5/3/2021 a car 2 2 5/4/2021 a fire 1 1 5/5/2021 you would like to keep only unique combinations of person product pairs ideally, the one with the highest quote, the newest version, and the latest date in this case, you would like to keep the last two rows let's see how we can achieve this through deselect! 1\ input drag and drop your orders data extension to your selected data extensions 2\ output the first thing we need to do for our target data extension is to create a field to use in deduplication since we need unique combinations of person and product we will create a custom value that combines these two fields click on create data extension button provide the name deduplicated de on multiple fields and click save click on add new value inside the custom values area set the name to id select apply formula to a field select apply any function under the insert field section, select orders data extension and person field click on the insert field button in the formula section add a white space, a plus icon (+), and one more white space under the insert field section, select orders data extension and product field click on the insert field button your formula should now look as follows click on the save button add the id custom value to your target data extension's fields click on the add all fields button of your orders data extension, under the available fields section now that we created our target data extension, we can set the deduplication rules, and deduplicate using the custom value we created as the unique field then, we can proceed with defining the priority criteria, as we would normally do click on save data extension and hit the create button on the pop up click on the gear icon on the right and select prio deduplication select id as the unique field click on next select quote from the dropdown and sort all values from highest to lowest click on add sorting option select version from the dropdown and sort all values from highest to lowest click on add sorting option select date from the dropdown and sort all values from highest to lowest your deduplication logic should look similar to the image below click confirm 3\ preview click on the run preview button, you should see the following results conclusion when you want to remove duplicates using a combination of fields, you can use the custom values feature with custom values , you can combine the fields into a single value, to use later on in prio deduplication