Skip to main content Skip to complementary content
Close announcements banner

Dollar-sign expansion using an expression

Expressions can be used in dollar-sign expansions.

The content between the brackets must start with an equal sign:


The expression will be evaluated and the value will be used in the expansion. For example:

// returns a string with the current year
// returns the year before the selected one

Example: Select a measure by referencing the measure in a chart expression

Example: Calculate the quota between two dimensions

File inclusion

File inclusions are made using dollar-sign expansions. The syntax is:


The above text will be replaced by the content of the file specified after the equal sign. This feature is useful when storing scripts or parts of scripts in text files.

For more information, see Include.

Dollar expansions and alternate states

A dollar expansion is normally not sensitive to alternate states. However, if the dollar expansion has an expression, this is evaluated in the state relevant to the object where the dollar expansion is made.

For example:


The calculation will return the sum of amount based on the selection in the state of the object.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!