Dataset Linking
You can link two datasets that share at least one common field, like a date. Linking datasets is useful when you're working with record types that cannot be joined.
For more information about dataset linking in SuiteAnalytics Workbook, see Linking Datasets.
To link datasets, use datasetLink.create(options). This method creates a datasetLink.DatasetLink object. You'll need to provide two arrays: an array containing the datasets to link (as dataset.Dataset objects) and an array of expressions representing the columns to use to link the datasets. The columns you choose should have the same data type, like string or date. Create column expressions using Dataset.getExpressionFromColumn(options). For more information, see Expressions. You can also include an optional ID.
var myDatasetLink = datasetLink.create({
datasets: [myFirstDataset, mySecondDataset],
expressions: [[myFirstColumnExpression, mySecondColumnExpression]],
id: 'myDatasetLinkId'
});
You can use linked datasets only in pivots, not in table views.
For more information, see N/datasetLink Module.