When configuring measures for the PivotDataSourceV2, the measures are not being applied.
In the dojo, with the measures configuring only the Sum, the Average is still appearing.
var pivotgrid = $("#pivotgrid").kendoPivotGridV2({
columnWidth: 120,
height: 570,
dataSource: {
data: revenue,
sort: { field: "Year", dir: "asc" },
schema: {
model: {
fields: {
Country: { type: "string" },
Revenue: { type: "number" },
Year: { type: "number" },
Sector: { type: "string" }
}
},
cube: {
dimensions: {
Country: { caption: "All Countries" },
Sector: { caption: "All Sectors" },
Year: { caption: "All Years" }
},
measures: {
"Sum": { field: "Revenue", format: "{0:c}", aggregate: "sum" },
"Average": { field: "Revenue", format: "{0:c}", aggregate: "average" }
}
}
},
columns: [{ name: "Year", expand: true }],
rows: [{ name: "Country", expand: true }],
measures: ["Sum"] // Should only show Sum, not Average
}
}).data("kendoPivotGridV2");