> For the complete documentation index, see [llms.txt](https://smartbooks.gitbook.io/smartbooks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smartbooks.gitbook.io/smartbooks-docs/data-models/financial-planning/formulas/previousperiod.md).

# PreviousPeriod()

The PreviousPeriod() function retrieves an account’s value from the previous period. It accepts the account to fetch data from and, optionally, a module and other filters.

## **Default Behavior:**

Without any arguments, it returns the previous period’s value for the same account.

## **Syntax:**

PreviousPeriod(account, cost\_center='cost\_center', view='view', module='module')

## **Parameters:**

* **account:**&#x54;he account code or name. When referencing another account, enclose its code in quotes.
* **cost\_center:**  The cost center code.
* **view:** Either 'ytd' or 'periodic'. .
* **module:** The module alias

## **Examples:**

* In a given month, using PreviousPeriod() on account "9000" returns the value from the previous month: PreviousPeriod('9000')
* To retrieve the previous period’s value for account "4500" within cost center "8500": PreviousPeriod('4500', cost\_center = '8500')
