Overview
Problem
You can define multiple datasets in a report and extract the required data from each respectively. Therefore, the data displayed in a report can come from different tables or databases. How can you add data columns from different datasets?
Solution
1. You can add dataset data with SQL statements. Details are not elaborated in this document.
2. You can drag each of the two data columns that come from different datasets into separate cells, and add the two cells with the SUM formula.
3. You can directly add dataset data with the dataset formula.
Example One: Adding Data with the SUM Formula
Report Design
1. Create two built-in datasets, as shown in the following figure.
2. Drag the data columns into the corresponding cells, insert the formula SUM(B1, C1) into cell D1, and set Expansion Direction to No Expansion for D1, as shown in the following figure.
3. Double-click C1 to set the filter condition: Product Equals to A1, as shown in the following figure.
Effect Display
Save the template and click Pagination Preview. The preview effect is shown in the following figure.
Example Two: Adding Data with the Dataset Formula
Report Design
You can simply use the formula Embedded1.select(Sales Volume, Product = A1) + Embedded2.select(Sales Volume, Product = A1), as shown in the following figure. In the formula, Embedded1 and Embedded2 are dataset names.
The formula obtains the values of Sales Volume through the extended Product values and adds the Sales Volume values to obtain the total of the two datasets.

