Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.
All documentation
  • 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

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