☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation
  • API Reference for older versions
  • 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

    pivot.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