GetObjectMeasure - chart functionON THIS PAGE
GetObjectMeasure() returns the name of the measure. Index is an optional integer denoting the measure that should be returned.
Information note
You cannot use this function in a chart in the following locations: title, subtitle, footer, reference line expression and min/max expression.
Information note
You cannot reference the name of a dimension or measure in another object using the Object ID .
Syntax:
GetObjectMeasure ([index])
Return data type: String
Example: Chart expressions
Example
Result
GetObjectMeasure ()
GetObjectMeasure (0)
Returns the name of the first measure in the chart.
GetObjectMeasure (1)
Returns the name of the second measure in the chart.
Example - GetObjectMeasure fundamentals
Chart expression
Overview
Open the Data load editor and add the load script below to a new section.
The load script contains:
Load script
Example:
LOAD * INLINE [
CustomerID, TransactionQuantity
049681, 13
203521, 6
203521, 21
];
Copy code to clipboard
Results
Load the data and open a sheet. Create a new table and add this field as a dimension:
Create the following measures:
Sum(TransactionQuantity) - first measure.
Avg(TransactionQuantity) - second measure
=GetObjectMeasure() , to find the first measure in the table.
=GetObjectMeasure(0) , to find the first measure in the table.
=GetObjectMeasure(1) , to find the second measure in the table.
Results table
CustomerID
Sum(TransactionQuantity)
Avg(TransactionQuantity)
GetObjectMeasure ()
GetObjectMeasure (0)
GetObjectMeasure (1)
Totals
40
13.333333
Sum(TransactionQuantity)
Sum(TransactionQuantity)
Avg(TransactionQuantity)
049681
13
13
=Sum(TransactionQuantity)
=Sum(TransactionQuantity)
=Avg(TransactionQuantity)
203521
27
13.5
=Sum(TransactionQuantity)
=Sum(TransactionQuantity)
=Avg(TransactionQuantity)
Looking at the results, you can see how the GetObjectMeasure function returns the measure indicated by the function parameters.