Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • getAllMeasures

    getAllMeasures(): Array

    [starting from version: 1.4]

    Returns a list of all available measures. Note that getAllMeasures has an async equivalent - getAllMeasuresAsync.

    Returns

    Array of ResultMeasureObjects that describe available measures.

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

    Example

    flexmonster.getAllMeasures(); 
    
    /* method returns an array of ResultMeasureObjects, 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",
        type: "number",
        uniqueName: "Sales"
      },   
      {
        aggregation: "none",
        availableAggregations: [ ],
        availableAggregationsCaptions: [ ],
        caption: "Test",
        format: "",
        formula: "(SUM("Price") / count("Price")) * 100",
        grandTotalCaption: "Total Test",
        name: "Test",
        type: "number",
        uniqueName: "Test"
      } 
    ]
    */ 

    Try on JSFiddle.

    See also

    getAllMeasuresAsync
    getMeasures
    getAllHierarchies
    getColumns
    getRows
    getReportFilters