Pivot
Last updated
Last updated
Provides the aggregate at the intersection of a row and a column
table - the table to query.
conditions - the conditions to apply to the chart
column_field - the field to use for columns
row_field - the field to use for rows
aggregate_type - the type of aggregate to use. If none is provided 'COUNT' will be used.
aggregate_field - if an aggregate other than 'COUNT is used, an aggregate field must be provided to determine what to aggregate on.
y_axis_label - the label for the y axis
x_axis_label - the label for the x axis
An array with 5 structures (6 if average is used for aggregate type). the first is an array ob objects with the columns information, the second is an array of objects with the row information, the third is a list of totals for each of the columns and for the grand total, the fourth is a string with the name of the x labels, the fifth is a string with the name of the y labels and the sixth being a 2 dimensional array with the count values that only appears when average is used as the aggregate type.
A screenshot of the data in ServiceNow: