ITableGrandTotalColumnDefinition
Home > @gooddata/sdk-ui > ITableGrandTotalColumnDefinition
ITableGrandTotalColumnDefinition type
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Defines columns that show grand total values.
**What it does:** Shows grand totals - these are columns that show the aggregation of values for the top level pivoting attribute, always appears as the rightmost columns.
**When it's created:** - Only when you have at least 1 attribute in the columns bucket (pivoting). - Only when you set total for the leftmost column attribute. - In the example, total is set for Brand x Sales.
**Real example:**
|         |        | Brand > Product     |                |
|         |        |---------------------|----------------|
|         |        | GoodData            | ColMin Σ       |
|         |        |---------------------|                |
|         |        | Panther  | Bear     |                |
|---------|--------|---------------------|----------------|
| Country | City   | Sales    | Sales    | Sales          |
|---------|--------|----------|----------|----------------|
| USA     | NYC    | 100      | 150      | 100            |
| USA     | LA     | 200      | 250      | 200            |
Signature:
export type ITableGrandTotalColumnDefinition = {
    type: "grandTotal";
    columnIndex: number;
    columnHeaderIndex: number;
    columnScope: ITableDataHeaderScope[];
} & (/**
 * Handles case, when pivoting and measures are in rows.
 */ {
    isEmpty: false;
    isTransposed: true;
    totalHeader: IResultTotalHeader;
    attributeDescriptor: IAttributeDescriptor;
} | /**
 * Handles standard pivoting case without transposition.
 */ {
    isEmpty: false;
    isTransposed: false;
    totalHeader: IResultTotalHeader;
    measureDescriptor: IMeasureDescriptor;
});
References: ITableDataHeaderScope, IResultTotalHeader, IAttributeDescriptor, IMeasureDescriptor