How to link two datasets in a NetSuite workbook and chart spend by customer

Start a workbook from a Transaction dataset, connect a Customer dataset from the Dataset Library, link them on the Date and Transaction keys and chart transaction amounts by customer.

The quick answer

In the workbook click Connect Dataset and choose the second dataset in the Dataset Library. Open the menu beside it and choose Create Dataset Link. On the Dataset Linking page check the Common Keys NetSuite suggests (here Date and Transaction) and click Link Datasets. Then fields of both datasets can go in the same chart.

The example is a workbook at Brightwater Trading Co. Elena Marrow, an administrator, charts transaction amounts by customer, with amounts from a Transaction Dataset and customer names from a Customer Dataset. The company, names and amounts are fictional example data.

Before you start

You need the SuiteAnalytics Workbook feature and a role with access to Analytics and to the records behind each dataset. Both datasets must already be saved, and they need at least one field in common that identifies the same row in both, here the transaction and its date. A dataset link is not a conventional join: SuiteAnalytics runs the two datasets as separate queries and combines and aggregates the results on the common keys.

01. Start a workbook from the Transaction Dataset

Go to Analytics, open the Datasets tab and click Transaction Dataset. Click Create New Workbook.

Transaction Dataset and Customer Dataset on the Datasets tab.

The new workbook asks which visualization type to use and, under the choices, offers Connect Dataset for more datasets.

02. Connect the Customer Dataset

Click Connect Dataset. The Dataset Library lists the account's other datasets. Click Customer Dataset. It now sits in the Dataset panel beside Transaction Dataset. Connecting does not relate the two: a field of the second dataset cannot be used in a chart until you link them.

Choose Customer Dataset in the Dataset Library.

Open the menu beside Customer Dataset and choose Create Dataset Link.

Create Dataset Link is in the menu beside each dataset.

The Dataset Linking page shows the two datasets side by side and the Common Keys already filled in with the fields they share by name and type: Date and Transaction. The pairs NetSuite suggests depend on your datasets, so check them. Remove a pair you do not want with the trash can, and drop fields into the Drop fields areas to add one. Together Transaction and Date identify one transaction in both datasets. A broad key such as only Customer or only Type can group unrelated records and give misleading totals. Click Link Datasets; Cancel leaves the workbook as it was.

Date and Transaction are the common keys.

Back in the workbook both datasets show a link icon.

Both datasets carry the link icon once they are linked.

04. Lay out the chart with fields from both datasets

Click Chart. In the Dataset panel choose Customer Dataset and drag Customer into X-Axis. Choose Transaction Dataset and drag Total Amount (Transaction Currency) into Measures, where it becomes a Sum.

Customer comes from the Customer Dataset and the amount from the Transaction Dataset.

05. Refresh and read the chart

Click Refresh. A layout change leaves the last picture in place until you refresh. The chart shows one column per customer: Marlowe Hardware 7,600, Harbor Light Marine 5,800, Pinecrest Supply 4,250, Alder Point Outfitters 4,000 and Cobalt Ridge Hardware 1,350. Linking changes neither dataset. Each keeps its own criteria, so a transaction filtered out of the Transaction Dataset never reaches the chart.

One column per customer, from the linked datasets.

You're done when:

  • both datasets show the link icon in the Dataset panel;
  • the Common Keys are the fields that identify the same transaction in both datasets;
  • the chart's X-Axis uses a field from one dataset and its measure a field from the other;
  • you have compared a few customer totals with the datasets.

Common questions

Why can't I use a field from my second dataset in the chart?

Connecting a dataset does not relate it to the first. Create a dataset link between them first, then fields of both datasets can be used together in a chart or pivot.

Is dataset linking the same as a join?

No. SuiteAnalytics runs the two datasets as separate queries and combines and aggregates the results on the common keys. Choose keys that identify the same grain in both datasets and compare a few totals before you rely on a chart.

How does NetSuite choose the common keys?

The Dataset Linking page opens with the fields the two datasets share by name and type already paired. The suggestion depends on your datasets, so check every pair, remove the ones that should not join the datasets and add any that are missing.

Why are my totals wrong after I linked the datasets?

A broad key such as only Customer or only Type can group records that are not related. Use keys that identify the same row in both datasets, such as the transaction and its date, and compare totals with the datasets.

Can I use a table with linked datasets?

No. Fields of linked datasets work in a chart or a pivot, and calculated measures can use fields from either dataset. A table view is not supported for linked datasets.