Note: The scenario below uses data from the DESelect Demo Data Package.
Scenario: You want to get the Company Name of all Accounts that in total have more than 50 euro in Orders.
Note: this scenario uses feature Formula's in Subqueries, which is available in DESelect Plus and Advanced.
1. Selection Criteria
On the selections overview screen, click on New to create a new selection.
Drag data extension DESELECT_DEMO_Accounts to the Selected Data Extensions section.
Drag field Id to the Filters section:
- Choose criteria: In Results
- From the dropdown select Data Extensıon DESelect_DEMO_Orders.
- Choose field AccountId
Now we have indicated we want to get the Accounts whose Id appears in the Orders data extension. However, we want to filter only the Accounts with more than 50 euros worth of Orders.
- Click on the fx button on the created filter.
- On the added line select Sum as the formula.
- Select field Total Amount from the available fields dropdown.
- Choose criteria: at least.
- Fill in 50 as the value.
We will now be filtering based on the sum of the amounts of the Orders; this has to be 50 or more.
2. Target Data Extension
Hit the Create Data Extension button, enter a name, eg. Accounts with larger Orders, and press Save.
Select the following fields by either double-clicking on them or dragging them to the section on the right:
- Company Name from DESELECT_DEMO_Accounts
Click Save Data Extension.
When you click Run Preview on the Preview screen, a results table will be shown with field Company Name from DESELECT_DEMO_Accounts.
The results table shows only Accounts that in total have more than 50 euro in Orders.