> 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/previousyear.md).

# PreviousYear()

The PreviousYear() function retrieves an account’s value from the same period in the previous year, acting as an alias for the Account() function with the year automatically set to the previous year.&#x20;

## Syntax:

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

## **Parameters:**

* **account:** *(Optional)* The account code or name. When referencing another account, enclose its code in quotes.
* **cost\_center:** *(Optional, named)* The cost center code.
* **view:** *(Optional, named)* The view code.
* **module:** *(Optional, named)* The module alias.

## **Examples:**

* In a given month, using PreviousYear() on account "9000" returns the value from the same month in the previous year: PreviousYear('9000')
* To retrieve the previous year’s value for account "4500" within cost center "8500": PreviousYear('4500', cost\_center='8500')&#x20;
