Get Free Trial
API reference
Table of contents

getMeasuresAsync

[starting from version: 2.9]

getMeasuresAsync(): Promise<Object[]>

Returns a Promise object that resolves to an array of measures selected in the slice. See the array’s structure in getMeasures.

Example

flexmonster.getMeasuresAsync().then(measures => {
measures.forEach(
  item => console.log(item);
 );
});

/* getMeasuresAsync method returns array of objects
[
{
"aggregation": "sum",
"availableAggregations": [
"sum",
"count",
"distinctcount",
"average",
"median",
"product",
"min",
"max",
"stdevp",
"stdevs",
"percent",
"percentofcolumn",
"percentofrow",
"percentofparentcolumntotal",
"percentofparentrowtotal",
"index",
"differenceofcolumn",
"differenceofrow",
"%differenceofcolumn",
"%differenceofrow",
"runningtotalsofcolumn",
"runningtotalsofrow"
],
"caption": "Sum of Price",
"calculated": false,
"grandTotalCaption": "Total Sum of Price",
"uniqueName": "Price",
"type": "number"
}
]
*/

See an example on JSFiddle.

See also

getMeasures
getAllMeasuresAsync
getAllHierarchiesAsync
getColumnsAsync
getRowsAsync
getReportFiltersAsync