A formula is a calculation that you use once in a specific place. You can add a formula as a new column in a table or place it in a single cell.
You create a formula using the Formula Editor. The editor includes three main parts: Objects, Functions, and Operators.
The system processes the formula only in that location. You cannot reuse it elsewhere in the document.

For more information about this topic, please read SAP BusinessObjects Web Intelligence User's Guide
Variable
A variable is a named calculation that you can use throughout your document.
You create a variable using the Variable Editor. The editor includes three main parts: Objects, Functions, and Operators.
Unlike the Formula Editor, the Variable Editor asks you to name the variable and set its qualification. The qualification defines how the variable works in your document: as a dimension, a measure, or a attribute.
After you create a variable, you can use it as an object in any report element.

For more information about this topic, please read SAP BusinessObjects Web Intelligence User's Guide
Building a Formula or Variable
All formulas and variables must start with an equals sign (=). You can use mathematical operators to create a calculation.
For example, to find a unit margin, divide sales revenue by quantity sold.
Use this formula:
=[Sales revenue] / [Quantity sold]
You can also use built-in functions. For example, to show the name of the document's creator in a cell, use the DocumentAuthor() function. To add text before the function's output, use the plus sign (+) to join the text and the function. Put the text in double quotes.
For example:
="Created by: " + DocumentAuthor()

Differences Between a Formula and a Variable
The main differences between a formula and a variable are their scope and reusability.
A formula is local and temporary. It exists only in the report element where you create it.
A variable is available throughout the document, and you can use it in any report element. When you update a variable, the system applies the change everywhere the variable is used. In contrast, you must update each formula one by one.

Let's Summarize What You've Learned
- A formula is a calculation used in a specific place and cannot be reused elsewhere in the document.
- A variable is a named calculation that you can use throughout the entire document.
- Both formulas and variables use editors with objects, functions, and operators to build calculations.
- Variables offer greater flexibility and efficiency because changes apply everywhere they are used.