Skip to main content
A formula can use other Variables as inputs. Write Variable names the same way they appear in cfo.ai.

Plain references

A plain name reads the Variable in the current segment:
If the formula is calculating a result for Sales, Revenue reads Sales Revenue. If it is calculating a result for West, it reads West Revenue. These three forms read the same current-segment value:

Names with spaces or punctuation

Wrap a name in backticks when it contains spaces, punctuation, an operator, or a reserved word:
Example:

A specific segment

Use brackets to replace one part of the current segment:
Other dimensions still follow the current segment.

An absolute reference

Place $ immediately after the Variable name when the lookup should not inherit the current segment:
You can combine an absolute reference with explicit filters:
Use absolute references carefully. Most formulas should follow the segment they are calculating.

Duplicate names

If two Variables have the same name, cfo.ai adds a short disambiguator:
Use the shortest disambiguator offered by the editor or Ari.

Date granularity

Add a granularity to Date when the formula works with time buckets:
Supported grains are Day, Week, Month, Quarter, Half, and Year.

Previous and next periods

Use a signed offset after a Variable to read a nearby period:
At a monthly grain, Revenue[-1] reads the previous month. The same expression follows the current Date grain.