Data Dimensions

Data dimensions help you analyze and format pivot data from specific dataset columns. You can create data dimensions to see how one column’s data relates to another column’s data. For instance, you can create data dimensions for transaction type and posting period to see how many transactions occur per period.

For more information about data dimensions in SuiteAnalytics Workbook, see Workbook Pivot Tables.

Start by creating data dimension items using workbook.createDataDimensionItem(options). This creates a workbook.DataDimensionItem object, where each item represents a dataset column you want to analyze. To create a data dimension item, you'll need to provide these parameters:

          var myItem = workbook.createDataDimensionItem({
    expression: myDataset.getExpressionFromColumn({
        alias: 'MyColumn'
    }),
    label: 'My Item'
}); 

        

Once you have your data dimension items, use workbook.createDataDimension(options) to combine them into a single workbook.DataDimension object. You can use the optional children parameter to specify child data dimensions or measures, and you can use the optional totalLine parameter to define how the total line appears using values from the workbook.TotalLine enum.

          var myDataDimension = workbook.createDataDimension({
    children: [myFirstDDChild, mySecondDDChild],
    items: [myFirstDDItem, mySecondDDItem],
    totalLine: workbook.TotalLine.HIDDEN
}); 

        

You can provide an array of workbook.DataDimension objects when you create pivot axes using workbook.createPivotAxis(options). For more information, see Pivot Axes.

          var myColumnAxis = workbook.createPivotAxis({
    root: workbook.createSection({
        children: [myDataDimension]
    }),
    sortDefinitions: [mySortDefinition];
}); 

        

Related Topics

General Notices