MicroStrategy ONE

Creating and saving base formulas

You can save individual formulas from existing metric definitions as base formulas. This allows you to reuse the formulas in other metric definitions, instead of retyping or rebuilding a formula you frequently use. A base formula used in a metric is linked to that metric as a shortcut. This means that when you update the base formula, it is automatically updated in all metrics in which it is used.

Base formulas contain only calculation data; they do not include level information or conditionality, and you cannot use them to perform transformations or calculate subtotals.

To use an existing base formula, find it in the Object Browser and double-click it. For steps, see Using base formulas in metrics.

If you no longer want to use the base formula, you can import the formula. This replaces the shortcut to the base formula with the actual formula definition, severing the link to the saved base formula. For steps, and the consequences of importing it, see Importing base formulas.

Prerequisite

This procedure assumes you have already created a metric with a formula that you want to reuse.

To save a base formula

  1. Open the metric in the Metric Editor. (How?)

  2. In the Metric component pane (located under the heading "Metric (metric name) is defined as"), select Formula.

  3. From the Tools menu, select Save Expression as Base Formula. The Export Base Formula dialog box opens.

    This option is available only if Formula is selected and the metric does not already use a base formula.

  4. Set the Replace the Base Formula with a shortcut to this one check box:

    • Select the check box to use the saved base formula in the metric.

    • Clear the check box to save the base formula but not use it in the metric. The metric retains the original formula definition.

  5. Select the folder in which to save the new base formula.

  6. Enter the name of the new base formula and click Save. You are returned to the Metric Editor.

When naming a MicroStrategy object, you must follow the naming convention rules for your particular database platform. Using a word reserved by your database platform may result in an error. Refer to your database documentation for a list of these database-reserved words.

Related Topics