@jsfkit/types
    Preparing search index...

    Type Alias PivotDataField

    Describes a data field in a pivot table. Data fields define the values that are aggregated and displayed in the data area of the pivot table.

    type PivotDataField = {
        baseField?: integer;
        baseItem?: integer;
        fieldIndex: integer;
        name?: string;
        numFmt?: string;
        showDataAs?: PivotShowDataAs;
        subtotal?: PivotDataFieldAggregation;
    }
    Index

    Properties

    baseField?: integer

    The index of the base field used for "show data as" calculations (e.g. percent difference). Only meaningful when showDataAs is set to a relative calculation mode.

    -1
    
    baseItem?: integer

    The index of the base item used for "show data as" calculations. Only meaningful when showDataAs is set to a relative calculation mode.

    1048832 (0x100100, sentinel meaning "use the previous item")
    
    fieldIndex: integer

    Index into the pivot table's PivotField array (and the cache's field array).

    name?: string

    The display name of the data field (e.g. "Sum of Revenue"). Derivable from the field name and aggregation function, but Excel always writes it.

    numFmt?: string

    The number format code for this data field's values (e.g. "General", "#,##0").

    showDataAs?: PivotShowDataAs

    How to display the aggregated values.

    'normal'
    

    The aggregation function to apply (NB: not related to row/column subtotals configured via PivotField.subtotalFunctions).

    'sum'