@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.

    This is a zero-based item index, except these sentinel values have specific meanings:

    • 1048828 — "previous value": the item preceding this one along the base field's axis
    • 1048829 — "next value": the item following this one
    • 1048832 — "not set" / no base item; the schema default
    1048832
    
    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'