Clean and combine two files before analyzing them
Your customers are in one tool, your orders in another. The two exports share a customer identifier, but neither is enough on its own: the CRM knows the segment and the region, the ERP knows the amounts. This tutorial combines them without touching the files.
What you get
Section titled “What you get”A data app with two charts built by you: revenue per customer segment and number of orders with no known customer in the CRM, computed by two Prepare transformations you can edit.
Duration: 20 minutes.
Before you start
Section titled “Before you start”-
A Matr account.
-
The two sample files:
- crm-customers.csv: 240 customers, with
customer_id,company,segment(SMB, Mid-market, Enterprise),region,account_manager,customer_since; - erp-orders.csv: 3,200 orders, with
order_id,customer_id,order_date,product,quantity,amount.
Both share
customer_id. 204 orders carry an identifier missing from the CRM: this is on purpose, you are going to find them. - crm-customers.csv: 240 customers, with
1. Create the data app with the two files
Section titled “1. Create the data app with the two files”It is the same flow as in From my files to my first dashboard, with two files instead of one.
-
On the Home page, drag
crm-customers.csvanderp-orders.csvtogether into the drop area, then Start the analysis. -
During the analysis, the links between files counter goes to 1: the log says that the two files share
customer_id(93.6% of orders find their customer). This link is what will make the join possible in Prepare.
-
Under What are you interested in?, type “Revenue per customer segment and per region”, select the Recommended by Matr card, then Create the DataApp and Go to the DataApp.
Expected result: a data app with two linked datasets (the crm-customers and erp-orders chips in the header) and a first dashboard. You are now going to build your own charts, step by step, to understand the combination.
2. Bring the customer segment onto each order
Section titled “2. Bring the customer segment onto each order”-
Open the Prepare tab.
-
In the Data panel on the left, click the orders dataset (
erp-orders). A check mark shows the dataset being displayed.
The grid shows the 3,200 orders. Prepare opens in read mode: the toolbar only offers Edit, Manage data, Pivot table, Density and Full screen.

-
Click Edit. The toolbar changes: Done, Filter, Compute, Join, Group, Deduplicate, Columns, Format, and on the right Use. The Draft rail appears on the left, with no step yet.


-
Click Join. Under Linked tables, the customers dataset is offered with the key
customer_id = customer_idalready filled in and the note “94% of rows find a match”. -
Check the columns to bring:
segment,regionandaccount_manager. The Prefix for brought columns is required and pre-filled withcrm_customers_: replace it withcrm_for short names.
-
Click Bring columns.
Expected result: three columns are added to the right of the grid: crm_segment, crm_region, crm_account_manager. For 204 orders, they are empty: these are the orders whose customer is not in the CRM. The step rail, on the left, shows the step “Columns from crm_customers”.


3. Compute revenue per segment
Section titled “3. Compute revenue per segment”-
Click Group.
-
Group by: check
segmentin the CRM-CUSTOMERS block (it is the brought column,crm_segment). -
Calculations: Column
amount, Calculation Sum, Result namerevenue.
-
Confirm with Group.
Expected result: the grid now shows only four rows: SMB, Mid-market, Enterprise, and an empty row for the orders with no customer. Each with its revenue.

4. Save the transformation and create the chart
Section titled “4. Save the transformation and create the chart”-
At the bottom of the rail, click Save. Replace the suggested name (“Transformation of erp-orders”) with “Revenue per segment”, then Save.

-
Click Use, then Create widget.


-
Widget title: “Revenue per customer segment”. Widget type: Bars. Horizontal axis:
crm_segment. Value:revenue. If the dashboard has several tabs, also pick the Dashboard tab. Confirm with Create widget.
Expected result: the message “Widget added to the dashboard” shows and the widget appears in Report. It replays the transformation every time it is displayed: if you change a step, the chart follows.
5. Isolate the orders with no known customer
Section titled “5. Isolate the orders with no known customer”Start again from the orders dataset for a second transformation.
-
In Data, click
erp-ordersagain. The previous draft is saved: you start fresh. -
Edit, then Join: bring
segmentas in step 2, with thecrm_prefix. -
Click Filter. Column
crm_segment, Condition Is empty. Confirm with Filter.
-
The rail says how many rows were removed: 204 remain.
-
Save under the name “Orders with no CRM customer”.
-
Use → Create widget: Title “Orders with no customer in the CRM”, Type KPI, KPI value From a column, Aggregation Row count (no column to pick: every remaining row counts). Confirm.
Expected result: a KPI at 204 in Report. When the CRM is updated and the files refreshed, this number will go down on its own.
6. Check in Report
Section titled “6. Check in Report”Open the Report tab. Your two widgets are there, after the ones Matr had built.

Your two widgets are there. In Prepare, the Transformations panel lists “Revenue per segment” and “Orders with no CRM customer”, each with the number of widgets that use it: this is why they can no longer be deleted without removing the widgets first.
If something goes wrong
Section titled “If something goes wrong”| What you see | What to do |
|---|---|
| Join offers no table | The link between the two datasets was not detected. Open the detail page of the orders dataset (Data > Datasets), Keys & relations tab, and declare the link on customer_id. See Data and datasets. |
| Several rows may match | Your customers table has duplicates on the key. Add a Deduplicate step on a transformation of the customers, or clean the source file. |
| The banner under the grid says Computed on the first N rows | The preview works on a sample; the widgets compute on everything. |
| The total per segment does not match your spreadsheet | Check the type of amount in the column detail: an amount read as text does not add up. |
What’s next
Section titled “What’s next”- Every available step (computed column, deduplication, format): Prepare: prepare the data.
- Turn the transformation into a dataset reusable in the app: Save as dataset.
- Connect the CRM and the ERP directly rather than through exports: Connect a source and keep the dashboard up to date.