Note: The scenario below uses data from the DESelect Demo Data Package.
Scenario: You want to add a new field to your Target Data Extension that indicates a categorization of the delivery distribution in terms of continent, based on the delivery countries of your Orders. However, you want to make exceptions and retain the same values on some rows on your Delivery Country.
Note: This scenario uses the feature Custom Values, which is available in DESelect Plus and Advanced.
1. Input
On the Selections overview screen, click on New to create a new Selection.
Drag Data Extension DESELECT_DEMO_Orders to the Selected Data Extensions section.
2. Output
Hit the Create Data Extension button, enter a name, eg. Deliveries per Continent, and press Save.
Now we're going to add a Custom Value:
- Under Custom Values on the left, click Add new value.
- Under Name, enter: Continent and hit Next.
- Choose Type: Dynamic Value.
- For Field Type, choose: Text.
- Add the first category:
- Click on Add Criteria
- Drag Delivery Country to the section on the right
- Criteria: Equals
- Value: Belgium
- Click Save
- Under Then, enter: Europe
- Add the second category:
- Click on Add Criteria
- Drag Delivery Country to the section on the right
- Criteria: Equals
- Value: Argentina
- Click Save
- Under Then, enter: North America
- On the Default field, click Compare
- On the first field, choose DESelect_Demo_Orders
- On the second field, choose Delivery Country
- Hit Save.
Now, your custom value criteria should look like this.
We have now created an extra field in our Target Data Extension that we want to populate with continent-based categorization. This field is not mapped to any fields in the source Data Extensions.
The logic defined above will, for each row, check the value of the Delivery Country of DESelect_DEMO_Orders, and output 'Europe' if it equals to 'Belgium', 'North America' if it equals to 'Argentina'. Since the only values we want to populate continents are the ones listed above, all the other values that do not match the criteria will display the same value from the Delivery Country field of DESelect_DEMO_Orders.
Select the following fields by dragging them to the Section on the right:
- Id and Delivery Country from DESELECT_DEMO_Orders.
- Continent from Custom Value.
Click Save Data Extension.
3. Preview
When you click Run Preview on the Preview screen, a results table will be shown with fields
- Id and Delivery Country from DESELECT_DEMO_Orders.
- Continent, populated with Europe, North America, and Delivery Country that does not need to be transformed.
Comments
0 comments
Please sign in to leave a comment.