☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation

getMeasures

getMeasures(): Array

[starting from version: 1.4]

Returns a list of the selected measures in the report. Note that getMeasures has an async equivalent - getMeasuresAsync.

Returns

Array of MeasureObjectReturned objects that describe the selected measures.

If data load is in progress an empty array will be returned.

Example

pivot.getMeasures(); 

/* method returns and array of MeasureObjectReturned objects
[
 {
aggregation: "sum",
availableAggregations: ["sum", "average", "percent"],
availableAggregationsCaptions: ["Sum", "Count", "Percent"],
caption: "Sum of Sales",
format: "currency",
grandTotalCaption: "Total Sum of Sales",
name: "Sales",
type: "number",
uniqueName: "Sales"
},
{
aggregation: "sum",
availableAggregations: ["sum", "count", "distinctcount", "average", "product", "min", "max", "percent", "percentofcolumn", "percentofrow", "index"],
availableAggregationsCaptions: ["Sum", "Count", "Distinct Count", "Average", "Product", "Min", "Max", "% of Grand Total", "% of Column", "% of Row", "Index"],
caption: "Sum of Orders",
format: "",
grandTotalCaption: "Total Sum of Orders",
name: "Orders",
type: "number",
uniqueName: "Orders"
}
]
*/

Try on JSFiddle.

See also

getMeasuresAsync
getAllMeasures
getAllHierarchies
getColumns
getRows
getReportFilters