If you want to reuse a calculation, it may be a good idea to put some flexibility into your calculation, so that the choice of which value should be used as an index (e.g., index 100) can be easily changed by using the Smartpad instead of having to edit the formula manually.
To tell the Smart Calculations editor that there is such a customizable reference in the formula, you must supply the metadata (name, default value etc.) for the ranges in question.
The metadata for a range are given in square brackets after the range, just as range filters are given in parenthesis.
Metadata
|
Syntax Example |
Metadata Element Description |
Parameter Name |
d1 ["A"] |
Name, identifies the parameter. Must always be present. All ranges with the same name are synchronized. |
Allow Range |
d1 ["A":range] |
Allow the user to select both starting and ending point. |
Editable Filters |
d1 ["A":filter(v,h,o)] |
Allow the user to edit the given filter
types. Filters: v = visibility, h = hierarchy,
|
Default Value |
d1 ["A"=0] |
When a template is used to add a new calculation, the default reference
can be specified here. |
Description |
d1 ["A","Source data"] |
Short explanation to be shown in the list of parameters and on the edit page of this parameter. |
The metadata for measures are like the metadata for ranges, except the ‘:range’ and ‘:filter’ elements are not available.