Menu
Download Free Trial
Table of contents

getAllMeasures

getAllMeasures():Array

[starting from version: 1.4]

Returns a list of all available measures.

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.getAllMeasures();

/* method returns array of objects, where the 2nd measure is calculated
[
  {aggregation: "sum", 
   availableAggregations: ["sum", "count", "distinctcount", "average", "product", "min", "max", "percent", "percentofcolumn"], 
   availableAggregationsCaptions: ["Sum", "Count", "Distinct Count", "Average", "Product", "Min", "Max", "Percent", "Percent of Column"], 
   caption: "Sum of Sales", 
   format: "currency", 
   grandTotalCaption: "Total Sum of Sales", 
   name: "Sales", 
   uniqueName: "Sales"},
  {aggregation: "none", 
   availableAggregations: [ ], 
   availableAggregationsCaptions: [ ], 
   caption: "Test", 
   format: "", 
   formula: "(SUM("Price") / count("Price")) * 100", 
   grandTotalCaption: "Total Test", 
   name: "Test", 
   uniqueName: "Test"}
]
*/

Try on JSFiddle.

See also

getMeasures
getAllHierarchies
getColumns
getRows
getReportFilters