getAllMeasures

getAllMeasures():Array

Returns a list of all available measures (both active and inactive) from the report.

Returns

Returns an array of objects. Each object is characterized by the following properties:

NameTypeDescription
aggregationStringThe measure’s aggregation name.
availableAggregationsString []An array of available aggregations for the measure.
availableAggregationsCaptionsString []An array of captions of available aggregations.
calculatedBooleanReturns true if the measure is calculated.
captionStringThe measure’s caption.
formatStringThe number formatting rule name.
formulaStringRepresents a formula if the measure is calculated.
grandTotalCaptionStringThe measure’s grand total caption.
individualBooleanDefines whether the formula is calculated using raw values (true) or using aggregated values (false).
nameStringThe measure’s name.
originalCaptionStringThe measure’s original caption.
uniqueNameStringThe measure’s unique name.

Example

webdatarocks.getAllMeasures();

/* The method returns an array of objects:
[
{
aggregation: "sum",
availableAggregations:
["sum", "count", "distinctcount", "average", "product",
"min", "max", "percent", "percentofcolumn", "index",
"difference", "%difference", "stdevp",
"stdevs", "runningtotals"],
availableAggregationsCaptions:
["Sum", "Count", "Distinct Count", "Average", "Product",
"Min", "Max", "Percent", "Percent of Column", "Index",
"Difference", "% Difference", "Population StDev",
"Sample StDev", "Running Totals"],
caption: "Sum of Sales",
format: "currency",
grandTotalCaption: "Total Sum of Sales",
name: "Sales",
originalCaption: "Sales",
uniqueName: "Sales"
},
{
aggregation: "none",
availableAggregations: [ ],
availableAggregationsCaptions: [ ],
caption: "Revenue",
format: "",
formula: "SUM('Price') * SUM('Quantity')",
grandTotalCaption: "Total Revenue",
name: "Revenue",
originalCaption: "Revenue",
uniqueName: "Revenue"
}
]
*/

Try on CodePen.

See also