Menu
Download Free Trial
Table of contents

getMeasures

getMeasures():Array

[starting from version: 1.4]

Returns a list of the selected measures in the report.

Returns

Array of objects. Each object in array contains the following parameters:

  • name
  • uniqueName
  • aggregation
  • availableAggregations – Array of available aggregations.
  • availableAggregationsCaptions – Array of available aggregations captions.
  • formula – For calculated measures.
  • caption
  • grandTotalCaption
  • format

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

Example

flexmonster.getMeasures();

/* method returns array of objects
[
  {aggregation: "sum", 
   availableAggregations: ["sum", "average", "percent"],
   availableAggregationsCaptions: ["Sum", "Count", "Percent"],
   caption: "Sum of Sales", 
   format: "currency", 
   grandTotalCaption: "Total Sum of Sales", 
   name: "Sales", 
   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", 
   uniqueName: "Orders"}
]
*/

See also

getAllMeasures
getAllHierarchies
getColumns
getRows
getPages