Documentation

PivotFieldGroup
in package

Describes how a single source (cache) field is grouped in a pivot table.

Two kinds of grouping are supported:

  • Numeric range grouping: values are bucketed into fixed-width intervals between a start and end number (e.g. 0-100, 100-200, ...).
  • Date grouping: date/time values are grouped by one or more calendar parts (years, quarters, months, ...).

The grouping is emitted into the pivot cache definition; when the workbook is opened, the spreadsheet application applies it while refreshing the pivot.

Tags
see
PivotTableBuilder

Table of Contents

Constants

GROUP_BY_DAYS  = 'days'
GROUP_BY_HOURS  = 'hours'
GROUP_BY_MINUTES  = 'minutes'
GROUP_BY_MONTHS  = 'months'
GROUP_BY_QUARTERS  = 'quarters'
GROUP_BY_SECONDS  = 'seconds'
GROUP_BY_YEARS  = 'years'
TYPE_DATE  = 'date'
TYPE_NUMERIC  = 'numeric'

Methods

date()  : self
Create a date grouping by one or more calendar units.
getEndDate()  : string|null
getEndNum()  : float|null
getGroupBy()  : array<string|int, string>
getInterval()  : float
getStartDate()  : string|null
getStartNum()  : float|null
getType()  : string
isDate()  : bool
isNumeric()  : bool
numeric()  : self
Create a numeric range grouping (buckets of $interval width).

Constants

Methods

date()

Create a date grouping by one or more calendar units.

public static date(string|array<string|int, string> $groupBy[, string|null $startDate = null ][, string|null $endDate = null ]) : self
Parameters
$groupBy : string|array<string|int, string>

one or more GROUP_BY_* constants

$startDate : string|null = null
$endDate : string|null = null
Return values
self

getEndDate()

public getEndDate() : string|null
Return values
string|null

getEndNum()

public getEndNum() : float|null
Return values
float|null

getGroupBy()

public getGroupBy() : array<string|int, string>
Return values
array<string|int, string>

getStartDate()

public getStartDate() : string|null
Return values
string|null

getStartNum()

public getStartNum() : float|null
Return values
float|null

numeric()

Create a numeric range grouping (buckets of $interval width).

public static numeric(float $interval[, float|null $startNum = null ][, float|null $endNum = null ]) : self
Parameters
$interval : float
$startNum : float|null = null
$endNum : float|null = null
Return values
self

        
On this page

Search results