Dimensions and Measures Custom Labels
A custom label replaces the name a dimension or measure shows in one visualization. It can be fixed text, or a string variable whose value actions change as users interact with the workbook.
Common uses for custom labels:
- The dimension label shows the active field of a drill-through dimension.
- The dimension label shows a filter applied to the chart.
- The measure label shows the period it covers. For example, instead of “Current year to date”, the label shows the selected year, and it changes when the user selects another year.
Working with custom labels
Section titled “Working with custom labels”Turn on Custom label in the properties of the dimension or measure in the visualization.

Static custom labels
Section titled “Static custom labels”A static custom label replaces the field name, or the label defined for it, in this visualization only.
In the example below, the custom label Month replaces the field name OrderMonthYear.

Dynamic custom labels
Section titled “Dynamic custom labels”A dynamic custom label uses a string variable. Actions can set the variable’s value when an event happens, and the label follows. To create the variable, see Creating variables to use with objects.

Examples of dynamic custom labels
Section titled “Examples of dynamic custom labels”Dimension label of a drill-through dimension
Section titled “Dimension label of a drill-through dimension”A drill-through dimension holds a list of fields. The user picks one, and every visualization that uses the drill-through dimension changes to that field. A custom label lets those visualizations name the field they now show.
-
Create a drill-through dimension (General Dimension in this example). See Use a drill-through dimension in a chart.
-
Create a string variable, here named vActiveField.
-
Create a chart that uses the drill-through dimension, and select the variable as its custom label.

-
Create an action that starts with the On … change event for the drill-through dimension (here On General Dimension change), and sets vActiveField to the new active field.

The active field has the form tableName.fieldName, so the action splits it at the full stop and assigns only the fieldName part to the variable. To learn how actions work, see Astrato Action Blocks.
The video at the top of this page shows this example.
Time-aware measure label
Section titled “Time-aware measure label”In the table below, the measure labels show the years they cover. When the user selects a different year, the labels update to show the latest selected year and the year before it.

-
Create a measure for each year. Parameters let one measure definition cover different date ranges; see Measure Parameters.

-
Create two string variables to hold the year values, for example vCurrentYear and vPrevYear.
-
Select the variables as the custom labels of the measures.

-
Create an action that starts with the On … filter change within … state event for the year field (here orderYear). In it, set vCurrentYear to the maximum orderYear, and vPrevYear to that maximum minus 1, both formatted as
####.
The video at the top of this page shows this example. For more ways to make a dashboard respond to the user, see Astrato Action Blocks.